On Tue, 14 Feb 2006, Dwight Tovey wrote:

> I guess our current hardware just isn't going to let us go to the 2.6
> kernel.  We'll have to just upgrade to the latest 2.4 kernel and stay
> there until we move to more current hardware.  The real problem there
> though is that even then we'll have to keep both versions around until all
> of the old systems fade away.
> 
> Matt and Alan - thanks again for all your help.

Don't give up yet.  Here's a patch that makes 2.6 usb-storage behave much
more like the 2.4 version (i.e., slower).  Maybe it will solve your
problem.

If it doesn't, then something must have changed in the OHCI driver.  I 
can't imagine what that might be, however.

Alan Stern



Index: usb-2.6/drivers/usb/storage/transport.c
===================================================================
--- usb-2.6.orig/drivers/usb/storage/transport.c
+++ usb-2.6/drivers/usb/storage/transport.c
@@ -494,16 +494,20 @@ static int usb_stor_bulk_transfer_sglist
 int usb_stor_bulk_transfer_sg(struct us_data* us, unsigned int pipe,
                void *buf, unsigned int length_left, int use_sg, int *residual)
 {
-       int result;
+       int result = 0;
        unsigned int partial;
+       struct scatterlist *sg;
 
        /* are we scatter-gathering? */
        if (use_sg) {
-               /* use the usb core scatter-gather primitives */
-               result = usb_stor_bulk_transfer_sglist(us, pipe,
-                               (struct scatterlist *) buf, use_sg,
-                               length_left, &partial);
-               length_left -= partial;
+               for (sg = buf; use_sg > 0 && length_left > 0;
+                               (--use_sg, ++sg)) {
+                       result = usb_stor_bulk_transfer_sglist(us, pipe,
+                                       sg, 1, length_left, &partial);
+                       length_left -= partial;
+                       if (result != USB_STOR_XFER_GOOD)
+                               break;
+               }
        } else {
                /* no scatter-gather, just make the request */
                result = usb_stor_bulk_transfer_buf(us, pipe, buf, 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to