Bug 19760 - отключить: CONFIG_USB_DEVICE_CLASS=y
Summary: отключить: CONFIG_USB_DEVICE_CLASS=y
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: kernel-image-std-def (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Vitaly Chikunov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-24 14:43 MSD by Andriy Stepanov (stanv)
Modified: 2010-07-05 17:23 MSD (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Stepanov (stanv) 2009-04-24 14:43:05 MSD
При подключении устройства (token) к USB
создается /dev/bus/usb/002/054 но его нельзя открыть сразу, а нужно подождать

в логах сообщение: Unable to open USB device /dev/bus/usb/002/054: No such file or directory

Хотя файл устройства существует. test -e говорит что файл есть.

26417 open("/dev/bus/usb/002/061", O_RDWR) = -1 ENOENT (No such file or directory)


[17:44:25] <vsu> два события на один major:minor
[17:44:44] <vsu> второе из них в принципе лишнее
[17:45:24] <vsu> происходит из-за CONFIG_USB_DEVICE_CLASS=y
config USB_DEVICE_CLASS
	bool "USB device class-devices (DEPRECATED)"
	depends on USB
	default y
	---help---
	  Userspace access to USB devices is granted by device-nodes exported
	  directly from the usbdev in sysfs. Old versions of the driver
	  core and udev needed additional class devices to export device nodes.

	  These additional devices are difficult to handle in userspace, if
	  information about USB interfaces must be available. One device
	  contains the device node, the other device contains the interface
	  data. Both devices are at the same level in sysfs (siblings) and one
	  can't access the other. The device node created directly by the
	  usb device is the parent device of the interface and therefore
	  easily accessible from the interface event.

	  This option provides backward compatibility for libusb device
	  nodes (lsusb) when usbfs is not used, and the following udev rule
	  doesn't exist:
	    SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
	    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"


А еще, предпологается что за этой опции не срабатывают правила HAL
<match key="info.subsystem" string="usb"> 
в нашем дистре оно работает только как:
<match key="info.subsystem" string="usb_device"> 

И имена всем переменным необходимо менять в обработчике правил:

PRODUCT="printf %x/%x/%x $HAL_PROP_USB_VENDOR_ID $HAL_PROP_USB_PRODUCT_ID \ $HAL_PROP_USB_DEVICE_REVISION_BCD"

я должен заменить на:

PRODUCT="printf %x/%x/%x $HAL_PROP_USB_DEVICE_VENDOR_ID $HAL_PROP_USB_DEVICE_PRODUCT_ID \ $HAL_PROP_USB_DEVICE_DEVICE_REVISION_BCD"
Comment 1 Anton Farygin 2009-04-24 14:45:26 MSD
для 5.0 тоже исправьте, плз.
Comment 2 Michail Yakushin 2010-07-05 17:23:05 MSD
в 2.6.32-alt15.1 исправлено