[EMAIL PROTECTED] said:
>> On 2.6.8.1, the _only_ message in dmesg is something like:
>> 
>>      kernel: usb 4-1.2: USB disconnect, address 3
>
> Pleas try turning on the USB debugging option in the kernel configuration.  
> This should provide a lot more information.

OK, I've reproduced this with 2.6.9 vanilla, USB debugging turned on,
and captured sysrq+T traces in the hung state.

First, the machine's USB modules say this when they initialize with
debugging turned on (sorry if this is unnecessary):

        usbcore: registered new driver usbfs
        usbcore: registered new driver hub
        USB Universal Host Controller Interface driver v2.2
        ACPI: PCI interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 16
        uhci_hcd 0000:00:1d.0: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1
        PCI: Setting latency timer of device 0000:00:1d.0 to 64
        uhci_hcd 0000:00:1d.0: irq 16, io base 0000ff80
        uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
        uhci_hcd 0000:00:1d.0: detected 2 ports
        usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
        usb usb1: default language 0x0409
        usb usb1: Product: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1
        usb usb1: Manufacturer: Linux 2.6.9 uhci_hcd
        usb usb1: SerialNumber: 0000:00:1d.0
        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: 2 ports detected
        hub 1-0:1.0: standalone hub
        hub 1-0:1.0: no power switching (usb 1.0)
        hub 1-0:1.0: individual port over-current protection
        hub 1-0:1.0: power on to power good time: 2ms
        hub 1-0:1.0: local power source is good
        ACPI: PCI interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 19
        uhci_hcd 0000:00:1d.1: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2
        PCI: Setting latency timer of device 0000:00:1d.1 to 64
        uhci_hcd 0000:00:1d.1: irq 19, io base 0000ff60
        uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
        uhci_hcd 0000:00:1d.1: detected 2 ports
        usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
        usb usb2: default language 0x0409
        usb usb2: Product: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2
        usb usb2: Manufacturer: Linux 2.6.9 uhci_hcd
        usb usb2: SerialNumber: 0000:00:1d.1
        usb usb2: hotplug
        usb usb2: adding 2-0:1.0 (config #1, interface 0)
        usb 2-0:1.0: hotplug
        hub 2-0:1.0: usb_probe_interface
        hub 2-0:1.0: usb_probe_interface - got id
        hub 2-0:1.0: USB hub found
        hub 2-0:1.0: 2 ports detected
        hub 2-0:1.0: standalone hub
        hub 2-0:1.0: no power switching (usb 1.0)
        hub 2-0:1.0: individual port over-current protection
        hub 2-0:1.0: power on to power good time: 2ms
        hub 2-0:1.0: local power source is good
        ACPI: PCI interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18
        uhci_hcd 0000:00:1d.2: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3
        PCI: Setting latency timer of device 0000:00:1d.2 to 64
        uhci_hcd 0000:00:1d.2: irq 18, io base 0000ff40
        uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
        uhci_hcd 0000:00:1d.2: detected 2 ports
        usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
        usb usb3: default language 0x0409
        usb usb3: Product: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3
        usb usb3: Manufacturer: Linux 2.6.9 uhci_hcd
        usb usb3: SerialNumber: 0000:00:1d.2
        usb usb3: hotplug
        usb usb3: adding 3-0:1.0 (config #1, interface 0)
        usb 3-0:1.0: hotplug
        hub 3-0:1.0: usb_probe_interface
        hub 3-0:1.0: usb_probe_interface - got id
        hub 3-0:1.0: USB hub found
        hub 3-0:1.0: 2 ports detected
        hub 3-0:1.0: standalone hub
        hub 3-0:1.0: no power switching (usb 1.0)
        hub 3-0:1.0: individual port over-current protection
        hub 3-0:1.0: power on to power good time: 2ms
        hub 3-0:1.0: local power source is good
        ACPI: PCI interrupt 0000:00:1d.3[A] -> GSI 16 (level, low) -> IRQ 16
        uhci_hcd 0000:00:1d.3: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4
        PCI: Setting latency timer of device 0000:00:1d.3 to 64
        uhci_hcd 0000:00:1d.3: irq 16, io base 0000ff20
        uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
        uhci_hcd 0000:00:1d.3: detected 2 ports
        usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
        usb usb4: default language 0x0409
        usb usb4: Product: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4
        usb usb4: Manufacturer: Linux 2.6.9 uhci_hcd
        usb usb4: SerialNumber: 0000:00:1d.3
        usb usb4: hotplug
        usb usb4: adding 4-0:1.0 (config #1, interface 0)
        usb 4-0:1.0: hotplug
        hub 4-0:1.0: usb_probe_interface
        hub 4-0:1.0: usb_probe_interface - got id
        hub 4-0:1.0: USB hub found
        hub 4-0:1.0: 2 ports detected
        hub 4-0:1.0: standalone hub
        hub 4-0:1.0: no power switching (usb 1.0)
        hub 4-0:1.0: individual port over-current protection
        hub 4-0:1.0: power on to power good time: 2ms
        hub 4-0:1.0: local power source is good
        uhci_hcd 0000:00:1d.3: port 1 portsc 0093
        hub 4-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
        hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
        uhci_hcd 0000:00:1d.3: CTRL: TypeReq=0x2301 val=0x2 idx=0x0 len=0 ==> -32
        usb 4-1: new full speed USB device using address 2
        usb 4-1: new device strings: Mfr=1, Product=2, SerialNumber=0
        usb 4-1: default language 0x0409
        usb 4-1: Product: Kinesis Keyboard Hub
        usb 4-1: Manufacturer: PI Engineering
        usb 4-1: hotplug
        usb 4-1: adding 4-1:1.0 (config #1, interface 0)
        usb 4-1:1.0: hotplug
        hub 4-1:1.0: usb_probe_interface
        hub 4-1:1.0: usb_probe_interface - got id
        hub 4-1:1.0: USB hub found
        hub 4-1:1.0: 4 ports detected
        hub 4-1:1.0: compound device; port removable status: FFRR
        hub 4-1:1.0: individual port power switching
        hub 4-1:1.0: individual port over-current protection
        hub 4-1:1.0: power on to power good time: 44ms
        hub 4-1:1.0: hub controller current requirement: 50mA
        hub 4-1:1.0: 450mA bus power budget for children
        hub 4-1:1.0: enabling power on all ports
        hub 4-1:1.0: port 2, status 0101, change 0001, 12 Mb/s
        ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96
        ACPI: PCI interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 23
        ehci_hcd 0000:00:1d.7: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI 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 0001 at 68
        PCI: Setting latency timer of device 0000:00:1d.7 to 64
        ehci_hcd 0000:00:1d.7: irq 23, pci mem e0044800
        ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
        ehci_hcd 0000:00:1d.7: reset command 080002 (park)=0 ithresh=8 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 usb5: new device strings: Mfr=3, Product=2, SerialNumber=1
        usb usb5: default language 0x0409
        usb usb5: Product: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller
        usb usb5: Manufacturer: Linux 2.6.9 ehci_hcd
        usb usb5: SerialNumber: 0000:00:1d.7
        usb usb5: hotplug
        usb usb5: adding 5-0:1.0 (config #1, interface 0)
        usb 5-0:1.0: hotplug
        uhci_hcd 0000:00:1d.3: uhci_result_control: failed with status 440000
        [df349270] link (1f3491e2) element (1eb0d040)
        0: [deb0d040] link (1eb0d080) e0 Stalled CRC/Timeo Length=7 MaxLen=7 DT0 
EndPt=0 Dev=2, PID=2d(SETUP) (buf=1f348520)
        1: [deb0d080] link (1eb0d0c0) e3 SPD Active Length=0 MaxLen=3 DT1 EndPt=0 
Dev=2, PID=69(IN) (buf=1e9c8200)
        2: [deb0d0c0] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 
Dev=2, PID=e1(OUT) (buf=00000000)

        hub 4-1:1.0: hub_port_status failed (err = -71)
        hub 4-1:1.0: connect-debounce failed, port 2 disabled
        hub 5-0:1.0: usb_probe_interface
        hub 5-0:1.0: usb_probe_interface - got id
        hub 5-0:1.0: USB hub found
        hub 5-0:1.0: 8 ports detected
        hub 5-0:1.0: standalone hub
        hub 5-0:1.0: ganged power switching
        hub 5-0:1.0: individual port over-current protection
        hub 5-0:1.0: Single TT
        hub 5-0:1.0: TT requires at most 8 FS bit times
        hub 5-0:1.0: power on to power good time: 20ms
        hub 5-0:1.0: local power source is good
        hub 5-0:1.0: enabling power on all ports
        uhci_hcd 0000:00:1d.3: uhci_result_control: failed with status 440000
        [df349270] link (1f3491e2) element (1eb0d040)
        0: [deb0d040] link (1eb0d080) e0 Stalled CRC/Timeo Length=7 MaxLen=7 DT0 
EndPt=0 Dev=2, PID=2d(SETUP) (buf=1f348520)
        1: [deb0d080] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 
Dev=2, PID=69(IN) (buf=00000000)

        hub 4-1:1.0: cannot disable port 2 (err = -71)
        uhci_hcd 0000:00:1d.3: port 1 portsc 008a
        hub 4-0:1.0: port 1, status 0100, change 0003, 12 Mb/s
        usb 4-1: USB disconnect, address 2
        usb 4-1: usb_disable_device nuking all URBs
        uhci_hcd 0000:00:1d.3: shutdown urb df068a80 pipe 40408280 ep1in-intr
        usb 4-1: unregistering interface 4-1:1.0
        usb 4-1:1.0: hotplug
        usb 4-1: unregistering device
        usb 4-1: hotplug
        hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
        hw_random hardware driver 1.0.0 loaded
        ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001803 POWER sig=j  CSC CONNECT
        hub 5-0:1.0: port 7, status 0501, change 0001, 480 Mb/s
        hub 5-0:1.0: debounce: port 7: total 100ms stable 100ms status 0x501
        uhci_hcd 0000:00:1d.0: suspend_hc
        hub 5-0:1.0: port 7 not reset yet, waiting 50ms
        ehci_hcd 0000:00:1d.7: port 7 full speed --> companion
        ehci_hcd 0000:00:1d.7: GetStatus port 7 status 003801 POWER OWNER sig=j  
CONNECT
        uhci_hcd 0000:00:1d.1: suspend_hc
        uhci_hcd 0000:00:1d.3: port 1 portsc 0093
        hub 4-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
        hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
        uhci_hcd 0000:00:1d.3: CTRL: TypeReq=0x2301 val=0x2 idx=0x0 len=0 ==> -32
        uhci_hcd 0000:00:1d.2: suspend_hc
        usb 4-1: new full speed USB device using address 3
        usb 4-1: new device strings: Mfr=1, Product=2, SerialNumber=0
        usb 4-1: default language 0x0409
        usb 4-1: Product: Kinesis Keyboard Hub
        usb 4-1: Manufacturer: PI Engineering
        usb 4-1: hotplug
        usb 4-1: adding 4-1:1.0 (config #1, interface 0)
        usb 4-1:1.0: hotplug
        hub 4-1:1.0: usb_probe_interface
        hub 4-1:1.0: usb_probe_interface - got id
        hub 4-1:1.0: USB hub found
        hub 4-1:1.0: 4 ports detected
        hub 4-1:1.0: compound device; port removable status: FFRR
        hub 4-1:1.0: individual port power switching
        hub 4-1:1.0: individual port over-current protection
        hub 4-1:1.0: power on to power good time: 44ms
        hub 4-1:1.0: hub controller current requirement: 50mA
        hub 4-1:1.0: 450mA bus power budget for children
        hub 4-1:1.0: enabling power on all ports
        hub 4-1:1.0: port 2, status 0101, change 0001, 12 Mb/s
        hub 4-1:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
        usb 4-1.2: new full speed USB device using address 4
        usb 4-1.2: skipped 1 descriptor after interface
        usb 4-1.2: skipped 1 descriptor after interface
        usb 4-1.2: new device strings: Mfr=0, Product=0, SerialNumber=0
        usb 4-1.2: hotplug
        usb 4-1.2: adding 4-1.2:1.0 (config #1, interface 0)
        usb 4-1.2:1.0: hotplug
        usb 4-1.2: adding 4-1.2:1.1 (config #1, interface 1)
        usb 4-1.2:1.1: hotplug
        hub 4-1:1.0: 386mA power budget left
        usbcore: registered new driver hiddev
        usbhid 4-1.2:1.0: usb_probe_interface
        usbhid 4-1.2:1.0: usb_probe_interface - got id
        hub 4-1:1.0: resume on port 1, status -19
        hub 4-1:1.0: reset change on port 2
        input: USB HID v1.00 Keyboard [05f3:0007] on usb-0000:00:1d.3-1.2
        usbhid 4-1.2:1.1: usb_probe_interface
        usbhid 4-1.2:1.1: usb_probe_interface - got id
        input: USB HID v1.00 Device [05f3:0007] on usb-0000:00:1d.3-1.2
        usbcore: registered new driver usbhid
        drivers/usb/input/hid-core.c: v2.0:USB HID core driver


Then, things work fine for a while without a peep in syslog. All of a
sudden, the USB keyboard stops working. This is now in syslog:

        drivers/usb/input/hid-core.c: input irq status -84 received
        last message repeated 31 times
        hub 4-1:1.0: transfer --> -84
        drivers/usb/input/hid-core.c: input irq status -84 received
        last message repeated 31 times
        hub 4-1:1.0: transfer --> -84
        hub 4-1:1.0: resetting for error -84
        usb 4-1.2: USB disconnect, address 4
        usb 4-1.2: usb_disable_device nuking all URBs
        uhci_hcd 0000:00:1d.3: shutdown urb df068180 pipe 40408480 ep1in-intr
        uhci_hcd 0000:00:1d.3: shutdown urb def29f00 pipe 40410480 ep2in-intr
        usb 4-1.2: unregistering interface 4-1.2:1.0
        usb 4-1.2:1.0: hotplug
        usb 4-1.2: unregistering interface 4-1.2:1.1
        usb 4-1.2:1.1: hotplug
        usb 4-1.2: unregistering device
        usb 4-1.2: hotplug
        usb 4-1: __usb_reset_device for hub!
        hub 4-1:1.0: can't reset; disconnecting

At this point, usb seems to be deadlocked on something. I can rmmod
usbhid and ehci_hcd with no problem, but rmmod uhci_hcd hangs and can't
be killed. Same with "cat /proc/bus/usb/004/003".

> It's possible that this is a problem with the HID driver.  The extra 
> debugging information will help narrow things down.  What also would help 
> is if, when the lock-up occurs, you could get a stack trace by using 
> Alt-SysRq-T.  The khubd process will be of particular interest.

Using alt+sysrq+t, I get these backtraces for khubd, and also those hung
rmmod and cat processes:

 khubd         D C03C0F10     0   887      1          1963   438 (L-TLB)
 de9f7ed4 00000046 ded83aa0 c03c0f10 0000007b df740e80 c0119514 0000000a 
        9e6ca522 0000007b ded83aa0 000003f3 9e6cafde 0000007b de9a5178 deaa1424 
        00000292 de9f6000 de9a5020 c02cd492 deaa142c 00000001 de9a5020 c0115a5b 
 Call Trace:
  [vprintk+294/362] vprintk+0x126/0x16a
  [__sched_text_start+126/266] __down+0x7e/0x10a
  [default_wake_function+0/18] default_wake_function+0x0/0x12
  [__down_failed+8/12] __down_failed+0x8/0xc
  [pg0+536554553/1069679616] .text.lock.hub+0x2d/0x98 [usbcore]
  [pg0+536552296/1069679616] hub_events+0x4b0/0x548 [usbcore]
  [pg0+536552503/1069679616] hub_thread+0x37/0x11a [usbcore]
  [autoremove_wake_function+0/87] autoremove_wake_function+0x0/0x57
  [ret_from_fork+6/20] ret_from_fork+0x6/0x14
  [autoremove_wake_function+0/87] autoremove_wake_function+0x0/0x57
  [pg0+536552448/1069679616] hub_thread+0x0/0x11a [usbcore]
  [kernel_thread_helper+5/11] kernel_thread_helper+0x5/0xb
 rmmod         D C03C0EE0     0  2619   2562                     (NOTLB)
 d1a11e30 00000082 d6517560 c03c0ee0 d6517560 c170faa0 d6517560 df15f580 
        d1a11e50 c02cd91f c170faa0 00000705 ba828981 0000013a d65176b8 deaa1424 
        00000282 d1a10000 d6517560 c02cd492 deaa142c 00000001 d6517560 c0115a5b 
 Call Trace:
  [schedule+643/1300] schedule+0x283/0x514
  [__sched_text_start+126/266] __down+0x7e/0x10a
  [default_wake_function+0/18] default_wake_function+0x0/0x12
  [preempt_schedule+37/62] preempt_schedule+0x25/0x3e
  [__down_failed+8/12] __down_failed+0x8/0xc
  [pg0+536554553/1069679616] .text.lock.hub+0x2d/0x98 [usbcore]
  [pg0+536545666/1069679616] usb_disconnect+0xae/0x1b8 [usbcore]
  [pg0+536581193/1069679616] usb_hcd_pci_remove+0xac/0x1bc [usbcore]
  [pci_device_remove+53/55] pci_device_remove+0x35/0x37
  [device_release_driver+100/102] device_release_driver+0x64/0x66
  [driver_detach+30/44] driver_detach+0x1e/0x2c
  [bus_remove_driver+76/132] bus_remove_driver+0x4c/0x84
  [driver_unregister+16/34] driver_unregister+0x10/0x22
  [pci_unregister_driver+19/32] pci_unregister_driver+0x13/0x20
  [pg0+536415263/1069679616] uhci_hcd_cleanup+0xf/0x63 [uhci_hcd]
  [sys_delete_module+379/395] sys_delete_module+0x17b/0x18b
  [do_munmap+217/444] do_munmap+0xd9/0x1bc
  [sys_munmap+80/116] sys_munmap+0x50/0x74
  [sysenter_past_esp+82/113] sysenter_past_esp+0x52/0x71
 cat           D C03C0EE0     0  2546   2447                     (NOTLB)
 d1ec3ed8 00000082 d59e6020 c03c0ee0 00000000 00000000 00000001 d1f4c080 
        0804e85c de5f7a80 00000001 00038fff f9efce9a 00000123 d59e6178 deaa1424 
        00000282 d1ec2000 d59e6020 c02cd492 deaa142c 00000001 d59e6020 c0115a5b 
 Call Trace:
  [__sched_text_start+126/266] __down+0x7e/0x10a
  [default_wake_function+0/18] default_wake_function+0x0/0x12
  [__down_failed+8/12] __down_failed+0x8/0xc
  [pg0+536593932/1069679616] .text.lock.devio+0x5/0x151 [usbcore]
  [vfs_read+244/303] vfs_read+0xf4/0x12f
  [sys_read+81/128] sys_read+0x51/0x80
  [sysenter_past_esp+82/113] sysenter_past_esp+0x52/0x71

does that pin it down? Is preempt a problem?

Jason



-------------------------------------------------------
This Newsletter Sponsored by: Macrovision 
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate 
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to