|
From: Peter S. <pe...@st...> - 2010-10-06 05:18:31
|
Xiaofan Chen wrote: > >> I just wonder why "usbfs" is returned as the kernel driver. > > > > It *is* the name of the kernel driver. ;) > > > >> Probably that should be fixed (in the kernel or in libusb). > > > > Why is it wrong? > > I do not think "usbfs" is a valid kernel driver name. It *is* the name of the kernel driver which is handling the device.. Just like Windows needs libusb0.sys or WinUSB.sys Linux needs usbfs. If I build a kernel *without* usbfs (CONFIG_USBFS=n) then I will not be able to use libusb with that kernel. When I attach a device of mine, here's what /sys/kernel/debug/usb/devices looks like: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=ffff ProdID=0004 Rev= 0.02 S: Manufacturer=foo S: Product=bar S: SerialNumber=p2 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 23 Ivl=10ms While running a libusb program that has that interface open, it changes a little: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=ffff ProdID=0004 Rev= 0.02 S: Manufacturer=foo S: Product=bar S: SerialNumber=p2 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=usbfs E: Ad=81(I) Atr=03(Int.) MxPS= 23 Ivl=10ms And when I stop that program, it goes back: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=ffff ProdID=0004 Rev= 0.02 S: Manufacturer=foo S: Product=bar S: SerialNumber=p2 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 23 Ivl=10ms Also note /sys/bus/usb/drivers/usbfs/ //Peter |