Like by recognizing this case and reporting USB_STOR_XFER_SHORT?That's not a timeout, "-EREMOTEIO" means it got a short read. In this case, that last packet included only 13 bytes not 512. (Assuming this was at high speed, otherwise it wasn't the last one, and that was likely 13 bytes out of 64.)Yeah, that suggests that either usb-storage needs to handle this somehow, right?
Likely that's so. It doesn't ... that "catch short read" logic
(after that "catch-all") won't kick in.
The scatterlist primitives treat short reads consistently as errors,
so there's only one fault mode to handle (for queue cleanup after
error, and so on). Raw urbs have two such modes, but storage was
only expecting the other one ... :)
- Dave
--- usb-dist/storage/transport.c Thu Nov 28 21:10:47 2002
+++ usb/storage/transport.c Mon Dec 9 18:38:37 2002
@@ -584,6 +586,12 @@
return USB_STOR_XFER_ERROR;
}
+ /* short read */
+ if (result == -EREMOTEIO) {
+ US_DEBUGP("-- short read\n");
+ return USB_STOR_XFER_SHORT;
+ }
+
/* the catch-all error case */
if (result < 0) {
US_DEBUGP("-- unknown error\n");
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
