# [solved] Slow USB 2.0

## erwan

Hello.

I have an external hard disk connected by usb (an iRiver mp3 player actually) and while it is USB 2.0, it is recognized as USB 2.0, the transfer speed is close to USB 1.1 (less than 10Mb/s, I measured it).

I have EHCI (for USB2.0) and OHCI (my usb mouse don't work without it).

My motherboard is an nForce2, my kernel a 2.6.8-gentoo-r3, and it works at full speed with my old 2.6.5. However since it was generated by genkernel (unlike the 2.6.8 that I configured myself) I can't compare the configuration of the 2 kernels.

lsmod

```

ohci_hcd               18820  0

vfat                   12032  1

fat                    40256  1 vfat

usbkbd                  6016  0

usbhid                 29504  0

usbmouse                4480  0

usb_storage            27776  1

ohci1394               30852  0

ieee1394               93492  1 ohci1394

ehci_hcd               26244  0

(...)

```

lspci | grep USB

```

0000:00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)

0000:00:02.1 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)

0000:00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)

```

cat /proc/bus/usb/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.8-gentoo-r3 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= 25/900 us ( 3%), #Int=  3, #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.8-gentoo-r3 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

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

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

P:  Vendor=1006 ProdID=3003 Rev= 1.00

S:  Manufacturer=iRiver

S:  Product=iRiver H300 Series

S:  SerialNumber=0123456789AB

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

I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=32ms

(...)

```

Help me!

----------

## MetatronX99

you try adding UHCI to the configuration yet?

that might help.

----------

## erwan

I tried... This did not help  :Sad: 

----------

## fls

Your kernel log may have useful information you could post:

```
dmesg | less
```

----------

## erwan

Ok, here are selected part of dmesg:

Relating to USB support:

```

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd: block sizes: ed 64 td 64

ACPI: PCI interrupt 0000:00:02.0[A] -> GSI 12 (level, low) -> IRQ 12

ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller

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

ohci_hcd 0000:00:02.0: irq 12, pci mem de983000

ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 3 ports detected

ACPI: PCI interrupt 0000:00:02.1[B] -> GSI 10 (level, low) -> IRQ 10

ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)

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

ohci_hcd 0000:00:02.1: irq 10, pci mem de985000

ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 3 ports detected

ACPI: PCI interrupt 0000:00:02.2[C] -> GSI 11 (level, low) -> IRQ 11

ehci_hcd 0000:00:02.2: nVidia Corporation nForce2 USB Controller

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

ehci_hcd 0000:00:02.2: irq 11, pci mem dea07000

ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 3

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

ehci_hcd 0000:00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 6 ports detected

ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>

ACPI: PCI interrupt 0000:00:0d.0[A] -> GSI 3 (level, low) -> IRQ 3

PCI: Setting latency timer of device 0000:00:0d.0 to 64

ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[3]  MMIO=[e0084000-e00847ff]  Max Packet=[2048]

USB Universal Host Controller Interface driver v2.2

ohci_hcd 0000:00:02.0: wakeup

usb 3-5: new high speed USB device using address 3

Initializing USB Mass Storage driver...

```

Plug & unplug the device:

```

usb 3-3: new high speed USB device using address 5

scsi5 : SCSI emulation for USB Mass Storage devices

  Vendor: TOSHIBA   Model: MK4004GAH         Rev: JC00

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sdc: 78126048 512-byte hdwr sectors (40001 MB)

sdc: assuming drive cache: write through

 /dev/scsi/host5/bus0/target0/lun0: p1

Attached scsi disk sdc at scsi5, channel 0, id 0, lun 0

Attached scsi generic sg2 at scsi5, channel 0, id 0, lun 0,  type 0

USB Mass Storage device found at 5

usb 3-3: USB disconnect, address 5

```

...And the full dmesg is here:

http://loisant.org/files/dmesg

----------

## fls

Is it possible that you have some USB 1.1 AND some USB 2.0 ports and pluggend the harddrive in wrong port? From dmesg it *seems* like you´ve connected the external harddrive to an USB 1.1 port.

Here´s the dmesg part that makes me think so:

 *Quote:*   

> usb 1-1.2: new full speed USB device using address 5
> 
> usb 1-1.2: not running at top speed; connect to a high speed hub
> 
> scsi1 : SCSI emulation for USB Mass Storage devices
> ...

 

USB 1.1 is called "full speed" whereas USB 2.0 is called "high speed" (if I got it right). And the kernel says your device is connected to a "full speed" port.

You might also have a look at the BIOS, perhaps you have an option to toggle "high speed mode" on or off. In my BIOS its called "USB legacy support" (or something similar) and it has to be disabled to enable the "high speed" ports.

BTW: While reading your dmesg I came across this:

 *Quote:*   

> 
> 
> Losing too many ticks!
> 
> TSC cannot be used as a timesource.  
> ...

 

I´d check wether you´ve enabled DMA on your harddrive and DVD burner with

```

hdparm /dev/hd{a,c}

```

HTH  :Smile: 

----------

## erwan

The problem was the DMA, I have an nForce card so I had to check an option for DMA support on nForce card.

Thank you!

----------

