On Thu, 10 Feb 2005, David Brownell wrote:

> On Thursday 10 February 2005 12:08 pm, Alan Stern wrote:
> > 
> >      "Device not responding" means either that the device
> > isn't working right or that it's disconnected from the bus (or there's a
> > lot of interference on the line, or a hardware fault...).  It's a
> > low-level problem.  "Request timed out" means that everything is working
> > correctly at the USB protocol level, and the device simply is unable to
> > send or receive data at the current time.  It's a higher-level error.
> 
> But do any drivers care about that difference?  None I've heard of do.
> 
> And the confusion only comes up with the synchronous usb_*_msg() calls,
> since otherwise there's no ambiguity.  Drivers that care about fault
> handling mostly avoid those calls anyway.  (They prevent reasonable
> signal handling, blocking CTRL-C ...)

All right, I give up.  How about this patch instead?

Alan Stern



===== Documentation/usb/error-codes.txt 1.15 vs edited =====
--- 1.15/Documentation/usb/error-codes.txt      2005-01-18 15:22:31 -05:00
+++ edited/Documentation/usb/error-codes.txt    2005-02-11 10:32:26 -05:00
@@ -88,13 +91,19 @@
                           prescribed bus turn-around time
                        c) unknown USB error 
 
-                       In cases b) and c) either -EPROTO or -EILSEQ
-                       may be returned.  Note that often the controller
-                       hardware does not distinguish among cases a),
-                       b), and c), so a driver cannot tell whether
-                       there was a protocol error, a failure to respond
-                       (often caused by device disconnect), or some
-                       other fault.
+                       Note that often the controller hardware does not
+                       distinguish among cases a), b), and c), so a
+                       driver cannot tell whether there was a protocol
+                       error, a failure to respond (often caused by
+                       device disconnect), or some other fault.
+
+-ETIMEDOUT (**)                No response packet received within the 
prescribed
+                       bus turn-around time.  This error may instead be
+                       reported as -EPROTO or -EILSEQ.
+
+                       Note that the synchronous USB message functions
+                       also use this code to indicate timeout expired
+                       before the transfer completed.
 
 -EPIPE (**)            Endpoint stalled.  For non-control endpoints,
                        reset this status with usb_clear_halt().
@@ -152,4 +161,7 @@
 usb_get_*/usb_set_*():
 usb_control_msg():
 usb_bulk_msg():
--ETIMEDOUT             timeout expired before the transfer completed
+-ETIMEDOUT             Timeout expired before the transfer completed.
+                       In the future this code may change to -ETIME,
+                       whose definition is a closer match to this sort
+                       of error.



-------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to