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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Feb 2007, Duncan Sands wrote:

> Thanks Alan.  The original question was: if an urb fails with an error,
> is there any point in resubmitting it after a delay (which is what the
> driver usually does) if the error was -ESHUTDOWN?  It sounds like there
> is no point to it.

No, there isn't.

>  And if the device is not disconnected, then it could
> even be harmful since the urb will be resubmitted endlessly...  While on
> the topic, are there any other error codes for which an urb should not be
> resubmitted?

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux