# USB not functioning properly

## MadOtis

Hello all,

I have a problem somewhere in my machine.  I recently rebuilt my machine from scratch to replace some hard drives and now USB isn't functioning properly for USB storage devices (iPod, Jump-drives, etc.)  They used to work before the rebuild, and they work properly if I dual-boot to Winders, so I doubt that I have a hardware problem.

I know this is WAAAY overkill, but I am trying the most options in my kernel just in case.  And this could easily be the problem...  I have enabled ALL SCSI options in menuconfig to build into the kernel (instead of as kernel modules), and as well, all USB options (again, not as modules).  I figure once I get it working, I'll go back and start removing unnecessary drivers.

What I am seeing are lines like this in /var/log/messages:

```
Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

Nov 27 15:02:42 grunt-call usb 1-3: new high speed USB device using ehci_hcd and address 3

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: port 3 high speed

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

Nov 27 15:02:42 grunt-call usb 1-3: device descriptor read/64, error -110

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call usb 1-3: khubd timed out on ep0in len=0/64

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: port 3 high speed

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

Nov 27 15:02:42 grunt-call usb 1-3: device descriptor read/64, error -110

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: port 3 high speed

Nov 27 15:02:42 grunt-call ehci_hcd 0000:00:02.2: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

Nov 27 15:02:42 grunt-call usb 1-3: new high speed USB device using ehci_hcd and address 4

```

From what I have found on Google, these types of errors can be caused by interrupt problems, yet /proc/interrupts shows no interrupt conflicts.  dmesg shows nothing at all when I plug in a jump/flash drive or iPod and udev isn't recognizing the device at all.

Oh, and if it helps, things like my USB wireless keyboard, mouse, and USB printer seem to be working fine.

Any advice on what I need to look for or need to share here to help diagnose the problem?

Thanks in advance!

Randy

----------

## MadOtis

bump

----------

## eracks

This is probably a really stupid question, since you said you enabled all USB options, but you have enabled usb mass storage support, right?

James

----------

## NeddySeagoon

MadOtis,

*all* USB options ?

The debuggiing options will prevent USB working normally and fill your /var/log/ quickly too. 

Did you enable SCSI Disk and SCSI Generic in the kernel?

I think usb-storage forces them on anyway.

----------

## MadOtis

Yes, I made sure SCSI Disk and SCSI Generic as well as USB mass storage were enabled.

I went back and disabled the debugging options for USB.

Here's a bit more information that may help.  I just started to notice this, too, or I would have included it in the original post...  It seems that the longer the machine is booted, the less reliable the keyboard and mouse are (they are a wireless USB setup from Logitech).  The keyboard seems to "lose characters" occasionally...  I type them, but they don't ever seem to make it to the screen.  Mouse seems to lose "clicks" as well...  for example, I click on an icon and nothing happens.  I click again and it acts like a "drag" instead and moves the icon around on the desktop or drags the window around.  I have ensured that there are fresh batteries in the kbd and mouse, but it seems to clear up on reboot (until the machine sits idle for a few hours when it starts again).

Any more suggestions would be GREATLY appreciated!

Cheers!

----------

## MadOtis

ok, I SORTA have this solved... although, I'm not sure why.

I was playing around further and removed *hci_hcd from my modules.autoload file.  I was thinking that perhaps uhci_hcd or ohci_hcd was causing the problem.  But, it turns out it is ehci_hcd that is preventing things from working.  I noticed that as udev was loading, it (udev) was loading the ehci_hcd module even though I had it commented out of modules.autoload.  So, I rmmod'ed ehci_hcd after the system booted and my pluggable devices started working (ipod, jump drive, etc.) and my keyboard and mouse issues stopped happening.  So, as it stands right now, I ONLY have ohci_hcd module loaded and everything USB seems to be working properly.

My next step is to remove ehci support entirely from the kernel, boot as I normally do, then see if it still resolves the problem.  If so, I'll update the subject to include [solved].

Thanks for the suggestions!

----------

## NeddySeagoon

MadOtis,

ehci-hcd provides USB 2 support. Its not needed if you have no USB 2 devices or can tolerate your USB 2 devices running at USB 1 speeds.

From your first post, you appear to have one USB 2 device.

Ensure that you do not mix USB 1 and USB 2 devices on the same root hub, since root hub can only support a single standard at a time.

If you don't know what a USB root hub is, look at the tree arrangement in usbview. The nodes at the top of the tree are root hubs.

Move your devices around until you get USB 1 and USB 2 separation.

----------

## MadOtis

I am pretty sure I need/want USB 2 support since my iPod depends upon it for charging.  I'll take a look at usbview and see what is/should be happening.  Thank you so much for the explanation, I think it should help to deduce what is happening.

----------

## MadOtis

ok, I think I've narrowed it down to the ehci_hcd module...  If I load it via modprobe, I lose keyboard, mouse, and any other USB device for several seconds (about 30-45 seconds or so).  After keyboard and mouse start working again, I start seeing the erratic behavior.  USBView (which is a really cool tool, BTW - thanks for letting me know it exists!) shows two OHCI hubs and one EHCI hub with printer plugged in to one OHCI hub and my wireless keyboard/mouse plugged into the other.

I also have a Belkin USB 2.0 hub that I am plugging in to one of the two (what I am 99% sure are) the two USB 2.0 ports in the back of the computer.  At least, that is where it was plugged in before I rebuilt the OS...  and then click "refresh" in USBVIEW.  It takes about 30 seconds to finish refreshing and nothing at all pops up under the EHCI root hub.  Can an external USB hub go bad?  I am going to boot into Winders tonight when I get home from work and see if it is detected as a high-speed device in Winders to be sure.

Here's the gotcha... if I plug my USB 2.0 devices into the Belkin hub (my iPod, USB 2.0 jumpdrive) they never get displayed in USBVIEW, nor do USB 1.1 devices.  I've moved the printer to the Belkin hub as well and cups reports it as not connected as does usbview.

So, I either have a problem with the Belkin hub or somehow, the USB port in the back of the computer isn't functioning in USB 2.0 mode.

----------

## NeddySeagoon

MadOtis,

If you paste your /proc/bus/usb/devices here, I can look at it with usbview too.

It would also be useful to have your lspci output.

----------

## MadOtis

Here's my lspci output:

```

00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)

00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)

00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)

00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb AC'97 Audio Controller (rev a1)

00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)

00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)

00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation NV31 [GeForce FX 5600 Ultra] (rev a1)

02:06.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)

```

and my /proc/bus/usb/devices

```

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.22-gentoo-r9 ehci_hcd

S:  Product=EHCI Host Controller

S:  SerialNumber=0000:00:02.2

C:* #Ifs= 1 Cfg#= 1 Atr=e0 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=   4 Ivl=256ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 4

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.22-gentoo-r9 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:02.1

C:* #Ifs= 1 Cfg#= 1 Atr=e0 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=   2 Ivl=255ms

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 20 Spd=12  MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=03f0 ProdID=4f11 Rev= 1.00

S:  Manufacturer=HP

S:  Product=Officejet 5600 series

S:  SerialNumber=CN675DE06H04CY

C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=cc Prot=00 Driver=(none)

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:* If#= 1 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=02 Driver=usblp

E:  Ad=03(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=83(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=84(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E:  Ad=07(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=87(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:  If#= 2 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=d4 Prot=00 Driver=(none)

E:  Ad=07(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=87(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms

E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 4

B:  Alloc= 28/900 us ( 3%), #Int=  2, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.22-gentoo-r9 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:02.0

C:* #Ifs= 1 Cfg#= 1 Atr=e0 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=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  9 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=046d ProdID=c512 Rev=30.07

S:  Manufacturer=Logitech

S:  Product=USB Receiver

C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

```

Thanks again for the assistance!

----------

## NeddySeagoon

MadOtis,

Your post tells that you have 3 root hubs

```
00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2) 
```

one of which is USB 2 capable.

usbview shows that its not in use an your Officejet 5600 printer is attached to a OHCI Host Controller. It shows that there is also no driver claiming the printer. Further, your EHCI Host Controller is not used.

I reacll reading somewhere that the nVidia CK8S USB is a very nasty implementation in that it provides 8 ports but internally some corners have been cust so its either all USB 2 or all USB 1, it will not support a mix even across what appears to be different root hubs.

Unplug both devices then reconnect the printer alone. Does it now appear as a USB 2 device?

Its possible I'm giving your USB controller some undeserved bad press as the EHCI controller says 

```
T:  Bus=01 
```

 and your devices are connected to busses 2 and 3.

----------

