USBAT 0.5.4 for Linux 2.6

Daniel Drake dsd at gentoo.org
Mon, 24 Jan 2005 13:30:27 +0000


Jon Lapham wrote:
> No joy in Mudville.
> 
> 10:48:00 plug in USB device sans memory card
> 10:49:00 plug in 48MB memory card
> 10:50:00 touch /dev/sda
> 10:51:00 unplug USB device
> 10:52:00 plug in USB device with 48MB memory card already in the slot

Silly mistake. Please open up 
/usr/src/linux/drivers/usb/storage/shuttle_usbat.c and edit line 943. It 
currently reads:

	if (!(status & 0x08)) {

It should read:

	if (!(status & 0x40)) {

In context:

		US_DEBUGP("usbat_flash_get_sector_count: No data ready, retrying...\n");
		msleep(250);
	}

	if (!(status & 0x40)) { // <-- this line needs changing
		US_DEBUGP("usbat_flash_get_sector_count: No data ready, giving up.\n");
		rc = USB_STOR_TRANSPORT_ERROR;
		goto leave;
	}

	// Read the device identification data

Then remake your modules and reload them.

Thanks for the swift testing.

Daniel