Subject: au1500 USB does not recover from flash drive removal during operations

From: "s c" <[email-masked]>
Date: Mon, 13 Nov 2006 10:06:44 -0500

Hello All,

I was testing the USB capabilities of the au1500 and discovered that
when a USB flash drive is removed during a copy operation twice, the
USB host controller/root hub will no longer detect if the device is
plugged in a third time.  I am assuming there is a bug in the au1xxx
parts of the USB drivers because Linux has been able to handle this
case for some time with the standard  EHCI/OHCI/UHCI host controllers.

I am testing using the dbau1500 development board and the 2.6.12
kernel with the fs in ram.

I would be interested if anyone has experienced anything similar with
the au1500 and the 2.6.12 or other (earlier or later) kernels.

The test goes something like this:

Plug in the USB drive - it gets detected.

(it does not seem to matter whether the drive is mounted or not, I
tested both ways.)

At the command prompt:
#dd if=/dev/zero of=/dev/sda bs=1k count=50k

after some time un-plug the drive.

Error messages (too many to post)

Repeat

Third time device is not detected.

I did not want to post a huge list of error messages, but I did notice
differences between the first and second try.

In the first, I got a lot of "rejecting I/O to device being removed"
from scsi, while after the second removal I did not. Instead I got a
lot of "Buffer I/O error on device sda" from scsi.

I am actively looking in to the problem and wanted to post to the list
in case someone else had come across this behaviour. I could list the
error messages if anyone is interested.

Any feedback would be appreciated.

Thanks

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 14 Nov 2006 13:12:45 +0000

On Mon, Nov 13, 2006 at 10:06:44AM -0500, s c wrote:

I suggest you take this to a specific USB list or linux-kernel.  The
behavious you describe does not seem to be MIPS-specific.

  Ralf