[linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.

[linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.

Post by Alan Ster » Sun, 25 Feb 2007 01:20:07



It is possible to receive ESHUTDOWN without being disconnected. For
instance, a race with suspend could cause it to happen (although if your
driver is written correctly that race should never occur). Another more
likely scenario is that you have an active URB while calling
usb_set_interface(); the endpoints for the old altsetting get disabled and
the URB returns with an ESHUTDOWN error.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.

Post by Alan Ster » Sun, 25 Feb 2007 03:20:09


No, there isn't.


Let's see... ENOENT and ECONNRESET indicate the URB was unlinked, so you
probably don't want to resubmit it. EPIPE indicates a problem on the
device end, so you would want to fix the problem before resubmitting (at
the very least you would want to clear the halt). EOVERFLOW is
questionable; if the device sent too much data once then it might do so
again. Ditto for EREMOTEIO (the device sent too little data). ENODEV
means the device was removed, so you definitely don't want to resubmit.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/