Bug 5777

Summary: ehci-hcd re-load necessary to use kbd on docking station hub
Product: Drivers Reporter: Len Brown (lenb)
Component: USBAssignee: David Brownell (dbrownell)
Status: REJECTED DOCUMENTED    
Severity: normal CC: bunk, greg, protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.13, 2.6.15-rc6, 2.6.16 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    
Attachments: failing 2.6.15 config
working 2.6.15 config (from SuSE Linux 10 via make oldconfig)
dmesg for 2.6.17-rc3 failure
dmesg for 2.6.17-rc3 failure after rmmod

Description Len Brown 2005-12-22 21:10:21 UTC
Running SL10 on a Compaq r3000 AMD64 laptop w/
USB keyboard and mouse -- and USB works fine.
But a 2.6.15-rc6 kernel built from scratch requires
that the ehci-hcd module be re-loaded to use the keyboard:

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=113505163009236&w=2

I built kernel.org 2.6.13 with a .config derived from
SL10 and it worked.  So I did the same with 2.6.15-rc6
and it also worked.  Attached are the SL10-derived config
and my regular config for 2.6.15-rc6.  The question comes
down to what in the SL10 config is making this work?
Comment 1 Len Brown 2005-12-22 21:13:01 UTC
Created attachment 6882 [details]
failing 2.6.15 config
Comment 2 Len Brown 2005-12-22 21:14:04 UTC
Created attachment 6883 [details]
working 2.6.15 config (from SuSE Linux 10 via make oldconfig)
Comment 3 Ulrich.Windl 2006-02-12 23:40:32 UTC
I have the very same effect with Novell/SuSE Linux 10.0 (with an USB DVD
Writer). The bug ID at Novell/SuSE is 139317. However even with USB 1 and plain
2.6.15.1 kernel, I have a similar problem with uhci_hcd occasionally. A new
device is refusing to accept an address until I unload and reload the uhci_hcd
module. I suspect some timing (race condition?) or initialization dependency
problem. Both machines are quite below the 1GHz class (400MHz Celeron, 700MHz
Pentium III), just in case that might matter.
Comment 4 Greg Kroah-Hartman 2006-02-14 16:46:55 UTC
2.6.16-rc4 might contain a patch that could fix this.  Can you retest when
that kernel is out (or 2.6.16-rc3-git3 also has it in it.)
Comment 5 Adrian Bunk 2006-04-22 13:00:52 UTC
Please reopen this bug if it's still present in kernel 2.6.16.
Comment 6 Len Brown 2006-05-11 15:16:07 UTC
kernel.org 2.6.16 still fails.
boot up to init level 3
usb keyboard does not work.
from serial console: # rmmod ehci-hcd
usb keyboard starts working

Unlike the initial report, however, upon subsequent modprobe ehci-hcd
the keyboard stops working again.

booting 2.6.16-28-default from SL10.1 RC the keyboard works fine,
and the interrupts from the keyboard come through ehci-hcd.
Comment 7 Len Brown 2006-05-11 15:24:15 UTC
Created attachment 8093 [details]
dmesg for 2.6.17-rc3 failure

Still fails in 2.6.17-rc3.  Here the dmesg is up  through boot
with ehci loaded and the keybaord not working.
Comment 8 Len Brown 2006-05-11 15:26:18 UTC
Created attachment 8094 [details]
dmesg for 2.6.17-rc3 failure after rmmod

same boot as above, but dmesg captured after
# rmmod ehci-hcd
and the keyboard is working.
Comment 9 Len Brown 2006-05-11 15:27:04 UTC
lsusb for working configuration:

lenb@r3000:/tmp> lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 006: ID 046d:c00e Logitech, Inc. M-BJ69 Optical Wheel Mouse
Bus 001 Device 005: ID 05a4:9760 Ortek Technology, Inc.
Bus 001 Device 004: ID 0409:0058 NEC Corp. HighSpeed Hub
Bus 001 Device 003: ID 0409:0058 NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 0000:0000

Comment 10 Len Brown 2006-05-11 19:11:12 UTC
failure case:

r3000:~ # lsusb
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
r3000:~ # cat /proc/interrupts
           CPU0
  0:      65818    IO-APIC-edge  timer
  1:         11    IO-APIC-edge  i8042
  4:       1633    IO-APIC-edge  serial
  7:          3    IO-APIC-edge  parport0
  8:          0    IO-APIC-edge  rtc
  9:        696   IO-APIC-level  acpi
 12:        120    IO-APIC-edge  i8042
 14:      11493    IO-APIC-edge  ide0
 15:       2110    IO-APIC-edge  ide1
 16:          4   IO-APIC-level  yenta, ohci1394
 17:        721   IO-APIC-level  yenta, eth0
 19:          0   IO-APIC-level  ohci_hcd:usb2
 20:          0   IO-APIC-level  NVidia nForce3, ohci_hcd:usb3
 21:         25   IO-APIC-level  ehci_hcd:usb1
NMI:         93
LOC:      65770
ERR:          0
MIS:          0
Comment 11 David Brownell 2006-09-10 08:26:53 UTC
What happens if you load EHCI first (the way you're supposed to),  
and _then_ load OHCI?  
  
If that makes it work, I'll speculate that the problem is some of  
the changes to the hub code that have been made over the last few  
years.  I know for a fact that I've tested EHCI using much that 
same NEC hub on an almost identical laptop, with no trouble seen. 
Comment 12 Natalie Protasevich 2007-06-14 11:00:45 UTC
Any updates on this problem? It's been lots of fixes that went in 2.6.22-rc4, maybe give it a shot?
Thanks,
--Natalie