I've read what I've found on usb, reviewed&fixed my settings, tried various version of cpqpjb driver and I still get exactly the same results - the driver registers but that's it, it doesn't even probe for devices. I have reports that the same driver works with 2.4.14 for other people. Here are the details of my current setup as well as all the diagnostics I could come up with.
basically: the driver registers, pjb_probe is never called, the device doesn't work (cat /dev/cpgpjb says "No such device"). Could it be that I am missing something in kernel config? I have all the needed modules (usbcore and usb-uhci) but there might be some funny setting I didn't notice. Also, should alternate uhci driver work better? I checked how the cpqpjb works, added some debug messages and here's what I have found: the following structure is used to register the driver using usb_register (&pjb_driver): static struct usb_driver pjb_driver = { name: "cpqpjb", probe: pjb_probe, disconnect: pjb_disconnect, }; so I guess that the pjb_probe should be called by kernel but it's never called, there is a message: printk(KERN_INFO "pjb_probe: looking for devices\n"); printed right in the beginning of the function but I never see it in syslog (I see other messages from cpqpjb printed using the same function). this is what happens when I try to open the /dev/cpqpjb for reading: pjb_open sets the static (on file level) variable static_pjb_state as file->private_data. pjb_read gets the above mentioned file (I guess it's the same one, otherwise it all wouldn't make any sense), casts file->private_data to pjb (pjb = (struct pjb_state *) file->private_data;) and checks for pjb->device, which is unfortunately 0, so -ENODEV is returned (and cat /dev/cpqpjb prints out the No such device message) [=static_pjb_state->device is 0] the static_pjb_state should have been set by pjb_probe, but pjb_probe is never called! this is where I hit the wall, who is supposed to call pjb_probe (well, kernel, but how exactly)? what are possible reasons it wasn't called? any ideas? ------------------------------------------------------------ settings & messages ------------------------------------------------------------ here are my kernel config settings related to usb: jojda:/usr/src/linux# grep -i usb ./.config | grep -v '^#' CONFIG_USB=m CONFIG_USB_DEBUG=y CONFIG_USB_DEVICEFS=y CONFIG_USB_UHCI=m CONFIG_USB_AUDIO=m CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m CONFIG_USB_HID=m CONFIG_USB_HIDDEV=y CONFIG_USB_DC2XX=m CONFIG_USB_SCANNER=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_VISOR=m I have tried the following versions of cpqpjb, all with exactly the same results: jojda:/home/erik/skusobna/pjb# find . -name cpqpjb.o ./pjbmanager-0.2.1/usbdrv/cpqpjb.o ./cpqpjb.240t6/cpqpjb.o ./pjbsdk-3.1.3/usbdrv/cpqpjb.o the last one is at: http://www.kolumbus.fi/toni.tammisalo/pjbsdk-3.1.3.tar.gz these are my settings: debian unstable jojda:~>uname -a Linux jojda 2.4.14 #1 Fri Nov 23 16:28:37 PST 2001 i686 unknown jojda:~>grep cpqpjb /etc/modules.conf ### update-modules: start processing /etc/modutils/erik.cpqpjb alias char-major-10-176 cpqpjb ### update-modules: end processing /etc/modutils/erik.cpqpjb jojda:~>ls -l /dev/cpqpjb crw-rw-rw- 1 root root 10, 176 Dec 20 04:43 /dev/cpqpjb jojda:/home/erik# lsmod | egrep '(usb)|(cpqpjb)' cpqpjb 2688 0 usb-uhci 20932 0 (unused) usbcore 50848 1 [cpqpjb usb-uhci] jojda:/home/erik# lspci|grep -i usb 00:07.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16) 00:07.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16) jojda:~>mount | grep usb usb on /proc/bus/usb type usbdevfs (rw,noexec,nosuid,nodev) running cat /dev/cpqpjb and watching the syslog (I enabled PJB_DEBUG in currently used driver, which is btw the one from Toni Tammisalo's page, see the link above): jojda:/home/erik# date;cat /dev/cpqpjb Sat Dec 22 01:41:52 PST 2001 cat: /dev/cpqpjb: No such device there are following lines in /var/log/syslog (same time): Dec 22 01:41:52 localhost kernel: pjb.open Dec 22 01:41:52 localhost kernel: pjb.close as far as I can see the crucial part is that I never get the pjb_probe message when I insert cpqpjb module: jojda:/home/erik/skusobna/pjb/pjbsdk-3.1.3/usbdrv# date;insmod ./cpqpjb.o Sat Dec 22 01:44:41 PST 2001 Warning: loading ./cpqpjb.o will taint the kernel: no license and the syslog messages: Dec 22 01:44:41 localhost kernel: Initializing PJB driver Dec 22 01:44:41 localhost kernel: usb.c: registered new driver cpqpjb per docs there should have been another message or two, first one of them from pjb_probe. when I unplug usb cable the syslog says: Dec 22 01:46:26 localhost kernel: hub.c: port 1 connection change Dec 22 01:46:26 localhost kernel: hub.c: port 1, portstatus 301, change 1, 1.5 Mb/s Dec 22 01:46:27 localhost kernel: hub.c: port 1, portstatus 300, change 0, 1.5 Mb/s when I plug it back in: Dec 22 01:46:55 localhost kernel: hub.c: port 1 connection change Dec 22 01:46:55 localhost kernel: hub.c: port 1, portstatus 301, change 1, 1.5 Mb/s Dec 22 01:46:55 localhost kernel: hub.c: port 1, portstatus 300, change 0, 1.5 Mb/s when I plug in/out another device (logitech optical wireless mouse) I get the same messages (it just says port 1 or port 2 depending on which port I use), I don't have drivers for mouse though. this is what /proc thinks I have: --------------------------------------------------------- jojda:/home/erik# ls -lR /proc/bus/usb/ /proc/bus/usb/: total 0 dr-xr-xr-x 1 root root 0 Dec 21 16:43 001 dr-xr-xr-x 1 root root 0 Dec 21 16:43 002 -r--r--r-- 1 root root 0 Dec 21 16:43 devices -r--r--r-- 1 root root 0 Dec 21 16:43 drivers /proc/bus/usb/001: total 1 -rw-r--r-- 1 root root 18 Dec 22 01:48 001 /proc/bus/usb/002: total 1 -rw-r--r-- 1 root root 18 Dec 22 01:48 001 --------------------------------------------------------- jojda:/home/erik# cat /proc/bus/usb/devices T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI Root Hub S: SerialNumber=c800 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI Root Hub S: SerialNumber=c400 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms --------------------------------------------------------- jojda:/home/erik# cat /proc/bus/usb/drivers usbdevfs hub cpqpjb --------------------------------------------------------- lsusb (usbview show the same info) output: Bus 002 Device 001: ID 0000:0000 Virtual Hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 9 Hub bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0000 Virtual idProduct 0x0000 Hub bcdDevice 0.00 iManufacturer 0 iProduct 2 USB UHCI Root Hub iSerial 1 c800 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x40 Self Powered MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type none wMaxPacketSize 8 bInterval 255 Language IDs: (length=4) 0000 (null)((null)) Bus 001 Device 001: ID 0000:0000 Virtual Hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 9 Hub bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0000 Virtual idProduct 0x0000 Hub bcdDevice 0.00 iManufacturer 0 iProduct 2 USB UHCI Root Hub iSerial 1 c400 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x40 Self Powered MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type none wMaxPacketSize 8 bInterval 255 Language IDs: (length=4) 0000 (null)((null)) any ideas? TIA erik