On Tue, 21 Dec 2004, Pete Zaitcev wrote:
> On Tue, 21 Dec 2004 10:17:11 -0500 (EST), Alan Stern <[EMAIL PROTECTED]>
> wrote:
>
> > It's not for lack of submission. I sent the revised version of that patch
> > to Pete Zaitcev on two separate occasions.
>
> I never saw it, Alan. Not personally and not on the list. The patch looks
> good, but it's nowhere in my mail or patched trees.
Really? I'm surprised. Anyway, here it is again... and I've changed the
delay to 110 us to match the current 2.6 version.
Alan Stern
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
--- 2.4.27/drivers/usb/storage/transport.c Fri Jul 9 10:56:27 2004
+++ 2.4.27-gl/drivers/usb/storage/transport.c Fri Jul 9 11:51:14 2004
@@ -1170,6 +1170,13 @@
/* if the command transfered well, then we go to the data stage */
if (result == 0) {
+
+ /* Genesys Logic interface chips need a 100us delay between
+ * the command phase and the data phase. Some systems need
+ * even more, probably because of clock rate inaccuracies. */
+ if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
+ udelay(110);
+
/* send/receive data payload, if there is any */
if (bcb->DataTransferLength) {
usb_stor_transfer(srb, us);
--- 2.4.27/drivers/usb/storage/usb.c Fri Jul 9 11:44:53 2004
+++ 2.4.27-gl/drivers/usb/storage/usb.c Fri Jul 9 11:49:44 2004
@@ -996,6 +996,15 @@
*/
(struct us_data *)ss->htmplt.proc_dir = ss;
+ /* According to the technical support people at Genesys Logic,
+ * devices using their chips have problems transferring more
+ * than 32 KB at a time. In practice people have found that
+ * 64 KB works okay and that's what Windows does. But we'll
+ * be conservative.
+ */
+ if (ss->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
+ ss->htmplt.max_sectors = 64;
+
/* Just before we start our control thread, initialize
* the device if it needs initialization */
if (unusual_dev && unusual_dev->initFunction)
--- 2.4.27/drivers/usb/storage/usb.h Fri Jul 9 10:56:03 2004
+++ 2.4.27-gl/drivers/usb/storage/usb.h Fri Jul 9 11:45:49 2004
@@ -193,4 +193,7 @@
/* Function to fill an inquiry response. See usb.c for details */
extern void fill_inquiry_response(struct us_data *us,
unsigned char *data, unsigned int data_len);
+
+/* Vendor ID list for devices that require special handling */
+#define USB_VENDOR_ID_GENESYS 0x05e3 /* Genesys Logic */
#endif
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel