# [UPDATE] USB not working

## torf

I got some problems getting USB to work on my system. Here is what I'm working with:

Kernel: 2.4.25-gentoo-r2

Motherboard: MSI K7M2 Delta (nForce 2 Chipset / USB 2.0)

First of all, I tried it using a Knoppix Live CD (3.4) and it works... So there must be an error in my Gentoo configuration.

On startup, I get the following messages:

```
usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

PCI: Setting latency timer of device 00:02.2 to 64

ehci_hcd 00:02.2: nVidia Corporation nForce2 USB Controller

ehci_hcd 00:02.2: irq 21, pci mem f8cbd000

usb.c: new USB bus registered, assigned bus number 1

PCI: cache line size of 64 is not supported by device 00:02.2

ehci_hcd 00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4

hub.c: USB hub found

hub.c: 6 ports detected

uhci.c: USB Universal Host Controller Interface driver v1.1

PCI: Setting latency timer of device 00:02.0 to 64

usb-ohci.c: USB OHCI at membase 0xf8cc5000, IRQ 20

usb-ohci.c: usb-00:02.0, nVidia Corporation nForce2 USB Controller

usb.c: new USB bus registered, assigned bus number 2

hub.c: USB hub found

hub.c: 3 ports detected

PCI: Setting latency timer of device 00:02.1 to 64

usb-ohci.c: USB OHCI at membase 0xf8cc7000, IRQ 22

usb-ohci.c: usb-00:02.1, nVidia Corporation nForce2 USB Controller (#2)

usb.c: new USB bus registered, assigned bus number 3

hub.c: USB hub found

hub.c: 3 ports detected

...

hub.c: Cannot enable port 1 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 1 over-current change

...

hub.c: Cannot enable port 2 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 2 over-current change

hub.c: Cannot enable port 3 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 3 over-current change

hub.c: Cannot enable port 4 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 4 over-current change

...

hub.c: Cannot enable port 5 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 5 over-current change

hub.c: Cannot enable port 6 of hub 1, disabling port.

hub.c: Maybe the USB cable is bad?

hub.c: port 6 over-current change

...

uhci.c: USB Universal Host Controller Interface driver v1.1

usb-uhci.c: $Revision: 1.275 $ time 20:47:21 Apr 25 2004

usb-uhci.c: High bandwidth mode enabled

usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
```

Here's what lsmod says:

```
# lsmod

Module                  Size  Used by    Tainted: P

sg                     32220   0  (autoclean) (unused)

st                     28248   0  (autoclean) (unused)

sr_mod                 15064   0  (autoclean) (unused)

sd_mod                 12108   0  (autoclean) (unused)

scsi_mod               94368   4  (autoclean) [sg st sr_mod sd_mod]

agpgart                36408   3  (autoclean)

ne2k-pci                4416   1

8390                    6384   0  [ne2k-pci]

vfat                    9644   3  (autoclean)

fat                    32440   0  (autoclean) [vfat]

nvidia               1631424  11

nvaudio                36820   0

ac97_codec             12052   0  [nvaudio]

soundcore               3652   2  [nvaudio]

eth1394                12152   0  (unused)

ieee1394              184932   0  [eth1394]

input                   3328   0  (unused)

usb-ohci               19208   0  (unused)

ehci-hcd               18156   0  (unused)

usbcore                60460   1  [usb-ohci ehci-hcd]
```

Problem is: Nothing happens if I plug in a USB device: No messages on the terminal (as it was the case with Knoppix), no messages in /var/log/messages.

Anybody got a hint where I could start searching for the error?

Thanks for your help!Last edited by torf on Thu Apr 14, 2005 3:33 pm; edited 1 time in total

----------

## NeddySeagoon

torf,

Ypu have ehci_hcd enabled for USB 2.0 devices, which is good if you have some. You also have ohci_hcd enabled which is right for your sort of USB 1.1/1.0 root hubs.

At the bottom of dmesg, uhci gets a mention, which is bad because it will fight with ohci.

Redo your kernel an leave out the uhci device driver under USB.

----------

## eMJay

Hi torf,

I use the same board and had to look at these annoying messages for a long time. But now I have found out the real stupid cause ...  :Laughing: 

You should have a really thorough look at the usb cabling with his connectors.

I'm speaking about the usb cables supplied with the case (here a Casetek CK-1018). These cables have often unfortunately a different pin configuration from the original MSI cables on Pin9 + 10.

Check the cables and compare with the MSI ones, e.g. from the D-bracket.

If you notice the called difference, simply cut of the cabling from Pin9 and 10 and you should have a working usb 1&2. (Pin9 isn't used here in any case and Pin10 is for USBOC detection which apparently isn't used by this MSI boards)

Are you shure that it's working with Knoppix? ... perhaps the Knoppix autoconfiguration at boottime bypasses the problem.

 *torf wrote:*   

> I got some problems getting USB to work on my system. Here is what I'm working with:
> 
> ....
> 
> hub.c: Cannot enable port 1 of hub 1, disabling port.
> ...

 

Nevertheless you should opt for uhci OR ohci ... I think MSI is using the ohci version, so uhci module is obsolete here. (but I have noticed no problems with ohci and uhci together ...)

I hope this hints would be helping to get USB together ...  :Wink: 

ciao, eMJay

----------

## torf

OK guys, finally (I know, a long time) I found the time to update my kernel. I'm now running 2.6.11-gentoo-r5 and as you told me, I only included one of the usb modules. Unfortunately, it is still not working.

I plugged in my digicam (which still works with the Knoppix LiveCD), and I tried to mount it (which should work without problems, see

http://www.qbik.ch/usb/devices/showdev.php?id=1873). But all I got is

```
# mount -t vfat /dev/sda1 /mnt/camera

mount: /dev/sda1 is not a valid block device

```

(The same with /dev/sda2, sda, sdb1, sdb2, sdb).

```
# mount -t usbfs /dev/sda1 /mnt/camera

```

works, and I get a file in /mnt/camera called "devices":

```
# cat /mnt/camera/devices

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

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

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

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.11-gentoo-r5 ohci_hcd

S:  Product=nVidia Corporation nForce2 USB Controller (#2)

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=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

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

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

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.11-gentoo-r5 ohci_hcd

S:  Product=nVidia Corporation nForce2 USB 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

```

Here some more information:

```
# lsmod

Module                  Size  Used by

vfat                   11136  0

fat                    35228  1 vfat

usb_storage            28928  0

ne2k_pci                8672  0

8390                    8064  1 ne2k_pci

ohci_hcd               18440  0

nvidia_agp              6044  1

snd_mixer_oss          17536  0

snd_seq_oss            31488  0

snd_seq_midi_event      6144  1 snd_seq_oss

snd_seq                47760  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          7180  2 snd_seq_oss,snd_seq

snd_intel8x0           28480  0

snd_ac97_codec         73976  1 snd_intel8x0

snd_pcm                79112  2 snd_intel8x0,snd_ac97_codec

snd_timer              20356  2 snd_seq,snd_pcm

snd                    45028  8 snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

snd_page_alloc          7812  2 snd_intel8x0,snd_pcm

usbcore               103672  3 usb_storage,ohci_hcd

nvidia               3916476  12

agpgart                28584  2 nvidia_agp,nvidia

```

```
# grep -i usb /var/log/messages

Apr 14 17:21:00 samurai HUB0 HUB1 USB0 USB1 USB2 F139 MMAC MMCI UAR1

Apr 14 17:21:00 samurai usbcore: registered new driver usbfs

Apr 14 17:21:00 samurai usbcore: registered new driver hub

Apr 14 17:21:02 samurai ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

Apr 14 17:21:02 samurai ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller

Apr 14 17:21:02 samurai ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1

Apr 14 17:21:02 samurai hub 1-0:1.0: USB hub found

Apr 14 17:21:02 samurai ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)

Apr 14 17:21:02 samurai ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2

Apr 14 17:21:02 samurai hub 2-0:1.0: USB hub found

Apr 14 17:21:04 samurai USB Universal Host Controller Interface driver v2.2

Apr 14 17:31:14 samurai HUB0 HUB1 USB0 USB1 USB2 F139 MMAC MMCI UAR1

Apr 14 17:31:14 samurai usbcore: registered new driver usbfs

Apr 14 17:31:14 samurai usbcore: registered new driver hub

Apr 14 17:31:16 samurai ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

Apr 14 17:31:16 samurai ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller

Apr 14 17:31:16 samurai ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1

Apr 14 17:31:16 samurai hub 1-0:1.0: USB hub found

Apr 14 17:31:16 samurai ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)

Apr 14 17:31:16 samurai ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2

Apr 14 17:31:16 samurai hub 2-0:1.0: USB hub found

Apr 14 17:32:34 samurai Initializing USB Mass Storage driver...

Apr 14 17:32:34 samurai usbcore: registered new driver usb-storage

Apr 14 17:32:34 samurai USB Mass Storage support registered.

```

Any hints on how to track down the problem?

----------

## Utoxin

You need to enable the following:

```
SCSI device support  --->

<*> SCSI device support

<*>   SCSI disk support

<*>   SCSI generic support (Maybe not needed. Not sure.)
```

Elucidation:

This is needed to allow mass-storage devices to show up as mountable devices. They'll show up as /dev/sd?? and should be mountable, if there's a filesystem on them.

----------

## torf

I already have those options activated:

```
<*> SCSI device support

    [*]   legacy /proc/scsi/ support

    ---   SCSI support type (disk, tape, CD-ROM)

    <*>   SCSI disk support

    < >   SCSI tape support

    < >   SCSI OnStream SC-x0 tape support

    < >   SCSI CDROM support

    <*>   SCSI generic support

    ---   Some SCSI devices (e.g. CD jukebox) support multiple LUNs

    [ ]   Probe all LUNs on each SCSI device

    [ ]   Verbose SCSI error reporting (kernel size +=12K)

    [ ]   SCSI logging facility

    SCSI Transport Attributes  --->

    SCSI low-level drivers  --->

```

I also got /dev/sda1 through /dev/sdd15, but those are IMHO only dummies/placeholders/whatever, like most of the stuff in /dev. 

Is there something I have to configure about cold/hotplug (ATM I got hotplug at runlevel default and coldplug at runlevel boot)?

----------

## Fenster

I'm having an identical problem. I was going to try an older kernel, but I guess from your post, that it wouldn't work.

----------

## torf

 *Fenster wrote:*   

> I'm having an identical problem. I was going to try an older kernel, but I guess from your post, that it wouldn't work.

 

Yeah, I already read that thread. I'm also trying to get that Ipod Shuffle to work  :Very Happy:   After all you already got it recognized, I'm not even that far - I don't get any messages when I connect something to the USB port.

I do have to put usb-storage in /etc/modules.autoload/kernel-2.6, right? It wouldn't load automatically at boot. I hope I get that thing working this weekend. Without a Windows-parallel-installation the Ipod is pretty useless to me right now  :Mad: 

----------

