PATCH: usb-storage: bugfixes for Freecom driver

From: Matthew Dharm (mdharm-usb@one-eyed-alien.net)
Date: Mon Nov 05 2001 - 22:28:04 EST


Attached is a patch to the usb-storage driver. Linus and Alan, please
apply. The patch is against 2.4.14.

Sorry for not sending this patch in time for 2.4.14, but it needed more
testing than time allowed.

This patch resolves the problems with detecting and initializing devices
behind a Freecom USB/ATA bridge, as well as problems with transfer length
calculations which were affecting CD-ROM users. The algorithm implemented
for initialization is the one recommended by Freecom based on their
experience with a wide variety of devices -- it's sub-optimal in many
cases, but you often can't identify those cases until much later.

As a side note, this is a great example of why the scsi command structure
needs a request_tranferlen as well as the existing request_bufflen fields.
It would be much easier all around if the various drivers told the
low-level controllers how much data to expect to move, in addition to the
total buffer allocation (which is always as big or larger).

I'm still working on a patch to resolve the one last issue with this
driver, where the driver fails if a command takes longer than 20 seconds to
execute. The bug is in the code that's supposed to recover from a device
timeout (the bridge has a 20 sec internal timeout), but it doesn't work
right. I'm working with Freecom on this, and should have a patch soon.

Matthew Dharm

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

C: They kicked your ass, didn't they? S: They were cheating! -- The Chief and Stef User Friendly, 11/19/1997



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:28 EST