Hi I'm using HP storageworks USB DAT device on RHEL4 (based on kernel 2.6.9). It works okay most of the times, but sometimes the driver does not detect the device (about 1 out of 10 times). No other USB devices are used on the system. Let me explain some details.
I turned on the CONFIG_USB_DEBUG option and put some orignal debug printk into the EHCI and core driver code. I found out that the ehci_hub_status_data() returns 0 when the DAT device is not detected. As a result the URB is not given back to the URB's complete function which is hub_irq(). If the function returns non zero, khubd is woken up as a sequence of hub_irq() and the setup control packets will be sent to the newly detected device. Am I right? The reason why ehci_hub_status_data() returns 0 is because the EHCI's port status register for the DAT is 0x1005 (PORT_POWER | PORT_PE | PORT_CONNECT), although it should be something like 0x1803 if the device is detected properly. As far as I know, the port status becomes 0x1005 only after the device is detected. Since the port status is 0x1005 when ehci_hub_status_data() is executed, the driver assumes that the device has already been detected, so it does not try to detect it as I mentioned above. Have any of you ever seen the same situation before? Or is there any way to fix this issue regarding the port status? Any suggestions would be helpful. Thanks, Tomohiro Kusumi T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=03f0 ProdID=0125 Rev=30.30 S: Manufacturer=Hewlett Packard S: Product=DAT72 USB Tape S: SerialNumber=XXXXXXXXXXXXXXXX C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96 ACPI: PCI interrupt 0000:00:1d.7[A] -> GSI 23 (level, low) -> IRQ 177 ehci_hcd 0000:00:1d.7: EHCI Host Controller ehci_hcd 0000:00:1d.7: reset hcs_params 0x104208 dbg=1 cc=4 pcc=2 ordered !ppc ports=8 ehci_hcd 0000:00:1d.7: reset hcc_params 6871 thresh 7 uframes 1024 64 bit addr ehci_hcd 0000:00:1d.7: capability 1000001 at 68 PCI: Setting latency timer of device 0000:00:1d.7 to 64 ehci_hcd 0000:00:1d.7: irq 177, pci mem f881a000 SELinux: initialized (dev usbdevfs, type usbdevfs), uses genfs_contexts ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:1d.7: reset command 080022 (park)=0 ithresh=8 Async period=1024 Reset HALT PCI: cache line size of 128 is not supported by device 0000:00:1d.7 ehci_hcd 0000:00:1d.7: init command 010001 (park)=0 ithresh=1 period=1024 RUN ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10 ehci_hcd 0000:00:1d.7: supports USB remote wakeup usb usb1: default language 0x0409 usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.9-acpi-debug ehci_hcd usb usb1: SerialNumber: 0000:00:1d.7 usb usb1: hotplug usb usb1: adding 1-0:1.0 (config #1, interface 0) usb 1-0:1.0: hotplug hub 1-0:1.0: usb_probe_interface hub 1-0:1.0: usb_probe_interface - got id hub 1-0:1.0: USB hub found hub 1-0:1.0: 8 ports detected hub 1-0:1.0: standalone hub hub 1-0:1.0: ganged power switching hub 1-0:1.0: individual port over-current protection hub 1-0:1.0: Single TT hub 1-0:1.0: TT requires at most 8 FS bit times hub 1-0:1.0: power on to power good time: 20ms hub 1-0:1.0: local power source is good [hub_configure] submit int urb for dev 1 [rh_urb_enqueue] enqueue int urb for dev 1 [rh_status_urb] set rh timer for dev 1 hub 1-0:1.0: enabling power on all ports ehci_hcd 0000:00:1d.7: irq status 0004 PCD [ehci_irq] port 8 status 0x00001000 [ehci_irq] port 7 status 0x00001803 <- the port status starts with 0x1803 [ehci_irq] port 6 status 0x00001000 [ehci_irq] port 5 status 0x00001000 [ehci_irq] port 4 status 0x00001000 [ehci_irq] port 3 status 0x00001000 [ehci_irq] port 2 status 0x00001000 [ehci_irq] port 1 status 0x00001000 [ehci_irq] finish ehci_irq without ehci_work [ehci_hub_status_data] port 1 status 0x00001000 [ehci_hub_status_data] port 2 status 0x00001000 [ehci_hub_status_data] port 3 status 0x00001000 [ehci_hub_status_data] port 4 status 0x00001000 [ehci_hub_status_data] port 5 status 0x00001000 [ehci_hub_status_data] port 6 status 0x00001000 [ehci_hub_status_data] port 7 status 0x00001005 <- somehow it became 0x1005 (should be still 0x1803) [ehci_hub_status_data] port 8 status 0x00001000 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel