# USB transfer suddenly stops working

## don quixada

Hi, I've been having this annoying problem for a couple of years now. If I transfer a large amount of data from a usb device after a few gigs the transfer suddenly stops in the middle and the device is no longer accessible until I reboot. It doesn't matter the device or the kernel (since it's been happening for a couple of years and a few kernels). But just for kicks:

```
# uname -a

Linux panza 3.2.1-gentoo-r2 #6 SMP PREEMPT Sun Jun 3 23:59:59 EDT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ AuthenticAMD GNU/Linux
```

dmesg is not much help as all I get is a message like this one:

```
[1322426.748080] usb 1-6: USB disconnect, device number 12
```

I've tried to search around for a solution but I'm not sure the keywords to use. Any help would be appreciated. Thanks!

dq

----------

## eccerr0r

I've seen something like this happen on my sole AMD machine as well, but no ideas what the root cause was, I ended up assuming it was the USB hardware.  I don't recall any issues with my other machines which tend to have Intel USB controllers.

I think my AMD machine probably uses a VIA EHCI USB2 controller; I don't think the southbridge includes anything except the OHCI USB1 controller.

I hate VIA.   I've not seen any chips yet that I liked from VIA...

----------

## Jaglover

I second that. Hardware problem.

----------

## don quixada

Is there any way around this short of getting a new machine? Right now all my usb ports are hooked-up directly to the motherboard but if I got a PCIe usb card would that potentially fix the problem?

----------

## Randy Andy

Hi don quixada,

its worth to give it a last try, with a seperate controller, but before you could do some more different tests, if not done already.

Did you used these USB devices with a USB Hub, with separate power adapter.

Mainboard / USB-Connectors has only support up to 500ma current per connector, and sometimes the voltage drops down if this happens especially with hard drives, and not with sticks which needs not as much power.

Some power supply's are so weak, that the additional current consumption of USB devices let brake down some things, up to complete crashes of the OS.

(seen by me as of the usage of a scanner). 

Did you do the same with a Live Distro, to exclude configuration trouble (hard to believe).

At least, try with a new controller card.

Much success, Andy.

----------

## don quixada

It doesn't seem to matter which kind of device. It could be a hard drive enclosure with an AC power adapter, or a laptop hardrive enclosure w/o an adapter, a usb stick, a phone... anytime it's a large amount of data it tends to happen but not every time. Sometimes I can get away with it not happening.

All the ports are hooked directly to the motherboard. It is the M3A motherboard and I believe there are three pin-connections for usb and those may be considered to be on a hub. There are some that are hard-wired into the back of the motherboard. Do you think if I used these that this may alleviate the problem? I can't remember if I tried to used those ports to transfer files...

I've never had my machine lock-up from this problem. It just disconnects from the device and cannot re-connect without a reboot. 

I haven't tried the LiveCD so I will try that when I get home. 

Thanks!

dq

----------

## eccerr0r

When my USB ports go dead, sometimes I can rmmod ehci-hcd and uhci-hcd (ohci-hcd is the other chipset USB controller that stays fine, but the USB2 devices are on the VIA USB chip) and reinsert them to "reset" the USB ports.  However I do have a PS/2 keyboard on this machine.

I haven't tried of the OHCI ports have the issue, but since they do not support USB2 I don't connect hard drives to them...

You definitely should try with an external powered USB hub, to see if it helps any...

A lot of my machines can't supply the full 500mA to power an external USB 2.5" bus powered mechanical hard drive.  But I don't think that's the problem in this case...  It's just spontaneous disconnection after a while...

----------

## don quixada

I do not own a powered usb hub so I will have to pick one up. Are all the ports on my motherboard EHCI? I assume that they are because I' think they're USB2. Also, since this is an amd machine I thing that I would need any UHCI drivers but if I have them installed do you think that they may be conflicting with the OHCI drivers? I have to check my kernel config to see what I have in there for usb drivers. 

So you are saying that a common reason for spontaneous disconnection is not enough power? I can attest that I may not have enough power as I have tried in the past to connect a USB powered hard drive and it didn't work (the lights on the drive indicated that there wasn't enough power).

dq

----------

## eccerr0r

USB2 is EHCI.

USB1 can be UHCI (Intel/Via standard) or OHCI (most everyone else)....

Not sure if the conflict should exist, both the UHCI and OHCI drivers target different hardware.  However all USB2 ports should be EHCI regardless of the underlying USB1 port (and they need the UHCI/OHCI driver to support USB1 speeds).

----------

