# Slow USB transfers

## peterpower

My external USB drive is working, but the transfer rates are very slow. I tested this with different combination's of external USB drives, harddrives, the onboard USB 1.0 and a PCI USB 2.0 card. The kernel has support for EHCI HCD, OHCI HCD and UHCI HCD.

All the combinations gave the following results (hdparm):

```

/dev/sdc:

 Timing cached reads:     2 MB in  2.14 seconds = 958.82 kB/sec

 Timing buffered disk reads:    4 MB in  4.23 seconds = 969.19 kB/sec

```

lspci -v:

```

00:09.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50) (prog-if 00 [UHCI])

   Subsystem: First International Computer, Inc. VA-502 Mainboard

   Flags: bus master, medium devsel, latency 32, IRQ 5

   I/O ports at c000 [size=32]

   Capabilities: [80] Power Management version 2

   Kernel driver in use: uhci_hcd

00:09.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50) (prog-if 00 [UHCI])

   Subsystem: First International Computer, Inc. VA-502 Mainboard

   Flags: bus master, medium devsel, latency 32, IRQ 12

   I/O ports at c400 [size=32]

   Capabilities: [80] Power Management version 2

   Kernel driver in use: uhci_hcd

00:09.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51) (prog-if 20 [EHCI])

   Subsystem: First International Computer, Inc. Device 1234

   Flags: bus master, medium devsel, latency 32, IRQ 11

   Memory at e6402000 (32-bit, non-prefetchable) [size=256]

   Capabilities: [80] Power Management version 2

   Kernel driver in use: ehci_hcd

```

/var/log/syslog after connecting the USB drive:

```

kernel: sd 4:0:0:0: [sdc] 488397168 512-byte hardware sectors: (250 GB/232 GiB)

kernel: sd 4:0:0:0: [sdc] Write Protect is off

kernel: sd 4:0:0:0: [sdc] Mode Sense: 33 00 00 00

kernel: sd 4:0:0:0: [sdc] Assuming drive cache: write through

kernel:  sdc: sdc1

kernel: sd 4:0:0:0: [sdc] Attached SCSI disk

kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0

kernel: usb-storage: device scan complete

kernel: usb 2-1:1.0: uevent

kernel: usb 2-1: uevent

```

Any suggestions? Thanks!  :Smile: Last edited by peterpower on Fri Sep 04, 2009 11:01 am; edited 1 time in total

----------

## Veldrin

Those speeds are prefectly normal for USB1.1 (11Mb/s = ~1MB/s), but for USB2.0 those are rather slow.

Can you verify the real speeds of you HDD or USB controller? (through a different computer, or another USB device).

Can you confirm, that it is really a USB 2.0 controller card you are using, and not some kind of PCI 2.1 USB card (which would be rather strange, 2.3 could be normal)? I am a bit confused about USB 2.1 - IIRC this does not exist.

cheersV.

----------

## peterpower

 *Veldrin wrote:*   

> Those speeds are prefectly normal for USB1.1 (11Mb/s = ~1MB/s), but for USB2.0 those are rather slow.
> 
> Can you verify the real speeds of you HDD or USB controller? (through a different computer, or another USB device).
> 
> Can you confirm, that it is really a USB 2.0 controller card you are using, and not some kind of PCI 2.1 USB card (which would be rather strange, 2.3 could be normal)? I am a bit confused about USB 2.1 - IIRC this does not exist.
> ...

 

It's a USB 2.0 and not a USB 2.1 controller (my bad). I verified it on my Mac where there are much faster transfer rates. More information about the PCI card here.

```
4 port (external) and 1 port (internal) USB 2.0 PCI interface card, USB 2.0 EHCI and USB 1.1 OHCI Compliant; USB 1.1 device compatible. The card offers transfer rates up to 480 Mb/s and up to 127 devices can be connected.

```

The external harddrive box is also USB 2.0 compatible  :Wink: 

lsusb:

```

Bus 001 Device 001: ID 1d6b:0002  

Bus 003 Device 001: ID 1d6b:0001  

Bus 002 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter

Bus 002 Device 001: ID 1d6b:0001  

```

----------

## doctork

 *peterpower wrote:*   

> 
> 
> ```
> 4 port (external) and 1 port (internal) USB 2.0 PCI interface card, USB 2.0 EHCI and USB 1.1 OHCI Compliant; USB 1.1 device compatible. The card offers transfer rates up to 480 Mb/s and up to 127 devices can be connected.
> 
> ...

 

The device is USB-2.0, but, according to the lsusb output, it is being connected to Bus 002 which is USB-1.1.

--

doc

----------

## amair

Hi,

do you use modules for ehci etc.? Then you should take care that ehci is loaded before [uo]hci.

I've put ehci into thte kernel and it fixed my problem.

Regards,

Andreas

----------

## peterpower

 *doctork wrote:*   

>  *peterpower wrote:*   
> 
> ```
> 4 port (external) and 1 port (internal) USB 2.0 PCI interface card, USB 2.0 EHCI and USB 1.1 OHCI Compliant; USB 1.1 device compatible. The card offers transfer rates up to 480 Mb/s and up to 127 devices can be connected.
> 
> ...

 

Hmm, how do you make the connection between Bus 002 and USB 1.1?

----------

## doctork

 *peterpower wrote:*   

> 
> 
> Hmm, how do you make the connection between Bus 002 and USB 1.1?

 

This tells you it's USB 1.1:

```
Bus 002 Device 001: ID 1d6b:0001
```

To make it more explicit, run /usr/sbin/update-usbids (as root) and then run lsusb again.

--

doc

----------

## peterpower

 *amair wrote:*   

> Hi,
> 
> do you use modules for ehci etc.? Then you should take care that ehci is loaded before [uo]hci.
> 
> I've put ehci into thte kernel and it fixed my problem.
> ...

 

Hi Andreas,

EHCI, OHCI and UCHI are build-in the kernel. I don't see any special module for the VIA chip on the USB controller.

----------

## peterpower

 *doctork wrote:*   

>  *peterpower wrote:*   
> 
> Hmm, how do you make the connection between Bus 002 and USB 1.1? 
> 
> This tells you it's USB 1.1:
> ...

 

Didn't know that one! Thanks, but I still don't see the link.

lsusb:

```

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. CY7C68300A EZ-USB AT2 USB 2.0 to ATA/ATAPI

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

```

----------

## doctork

 *peterpower wrote:*   

> 
> 
> Didn't know that one! Thanks, but I still don't see the link.
> 
> lsusb:
> ...

 

Well, your lsusb says that the Cypress card is connected to Bus 002, and that Bus 002 is USB 1.1.  QED.

That, and the fact that your devices are running at USB 1.1 speeds.

--

doc

----------

## peterpower

 *doctork wrote:*   

>  *peterpower wrote:*   
> 
> Didn't know that one! Thanks, but I still don't see the link.
> 
> lsusb:
> ...

 

I see, which is strange. The USB harddrive is connected to the USB port of the USB 2.0 controller.

----------

## Veldrin

Do you use any intermediary devices (USB Hubs)? 

If only 1 Device on a bus only supports the USB 1.1 the entire bus gets slowed down to USB 1.1.

cheers

V.

----------

## doctork

If there were any hubs, they should show up in the lsusb listing.

I suspect the problem is inside the computer.  I have an old IBM T40p laptop that exhibits the same behavior.  It turns out that the problem is on the motherboard -- a loose connection somewhere in the USB interface.  

--

doc

----------

## peterpower

 *doctork wrote:*   

> If there were any hubs, they should show up in the lsusb listing.
> 
> I suspect the problem is inside the computer.  I have an old IBM T40p laptop that exhibits the same behavior.  It turns out that the problem is on the motherboard -- a loose connection somewhere in the USB interface.  
> 
> --
> ...

 

In that case there must be something wrong with the PCI USB-controller. I'm going to get a new one and try it out. Thanks for your help!

----------

## peterpower

Another USB controller card fixed the problem! Thanks all!

Lesson learned: always look at the speed of the USB bus to which the device is connected to.

----------

