switch (status) {
case -EINPROGRESS:
case -EBUSY:
+ case -EIDRM:
continue;
default:
dbg ("urb unlink --> %d", status);
if (!status)
status = usb_submit_urb (urb, SLAB_ATOMIC);
if (status) {
- if (status == -ECONNRESET || status == -ENOENT)
- status = 0;
urb->status = status;
complete ((struct completion *) urb->context);
}
/* unlinking that should always work. variable delay tests more
* hcd states and code paths, even with little other system load.
*/
- wait_ms (jiffies % (2 * INTERRUPT_RATE));
+ msleep (jiffies % (2 * INTERRUPT_RATE));
retry:
retval = usb_unlink_urb (urb);
- if (retval == -EBUSY) {
+ if (retval == -EBUSY || retval == -EIDRM) {
/* we can't unlink urbs while they're completing.
+ * or if they've completed, and we haven't resubmitted.
* "normal" drivers would prevent resubmission, but
* since we're testing unlink paths, we can't.
*/