A few months ago I bought an external HD with usb2 connection.
Under Windows XP it works. Under SUSE 9.2 it works but stalls, especially when sending large amounts of data.


When a stall occurs it is followed by a reset after two minutes and data transfer resumes, and after a few hundred MBs it will stall again.

Looking into this problem I found some references to the Genesys Logic "bug".
But I could not confirm that I have the Genesys logic hardware.

A lsusb gives me:
Bus 004 Device 005: ID 0840:0085 Argosy Research, Inc.
Bus 004 Device 002: ID 0424:a700 Standard Microsystems Corp.
Bus 004 Device 001: ID 0000:0000

Since this problem has all the similar characteristics as reported for the Genesys Logic chip, I tried masking the Argosy hardware as Genesys.

So, I downloaded the latest version of the SUSE kernel (2.6.8 - 3.24) and changed the

Genesys ID (0x05e3) to the Argosy ID (0x0840),

and recompiled the kernel.

I copied several GBytes of data to the external HD without any stalling (!).

This indicated I was on the right track.

Ofcourse I am interested in a more structural approach (most recent on 
linux-2.6.11.4).
My suggestions are listed below (additions marked with "+")

drivers/usb/storage/usb.h (line 187)

/* Vendor ID list for devices that require special handling */
#define USB_VENDOR_ID_GENESYS           0x05e3  /* Genesys Logic   */
+ #define USB_VENDOR_ID_ARGOSY          0x0840  /* Argosy Research, external HD 
works with Genesys logic */

drivers/usb/storage/scsiglue.c (line 120-122)
     if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS 
&&
                      sdev->request_queue->max_sectors > 64)
              blk_queue_max_sectors(sdev->request_queue, 64);

+        if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_ARGOSY 
&&
+                        sdev->request_queue->max_sectors > 64)
+                blk_queue_max_sectors(sdev->request_queue, 64);


drivers/usb/storage/transport.c (line 997-998)

      /* Genesys Logic interface chips need a 100us delay between the
       * command phase and the data phase.  Some devices need a little
       * more than that, probably because of clock rate inaccuracies. */

      if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == 
USB_VENDOR_ID_GENESYS)
              udelay(110);
+        if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == 
USB_VENDOR_ID_ARGOSY)
+                udelay(110);

And that's it.

I have been copying many Gbytes to my external HD without any problems, by 
using these patches
So, hopefully this can be a structural contribution towards the next kernel 
release?

Frans Nijenhuis





-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to