ChangeSet 1.1371.759.8, 2004/04/23 15:44:32-07:00, david-b@pacbell.net [PATCH] USB: usbtest, smp unlink modes Handle some SMP-visible unlink states better. drivers/usb/misc/usbtest.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c Fri May 14 15:34:14 2004 +++ b/drivers/usb/misc/usbtest.c Fri May 14 15:34:14 2004 @@ -802,6 +802,7 @@ switch (status) { case -EINPROGRESS: case -EBUSY: + case -EIDRM: continue; default: dbg ("urb unlink --> %d", status); @@ -1038,8 +1039,6 @@ 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); } @@ -1077,8 +1076,9 @@ wait_ms (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. */