git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
patch-2_6_7-vs1_9_1_12
[linux-2.6.git]
/
drivers
/
usb
/
misc
/
usbtest.c
diff --git
a/drivers/usb/misc/usbtest.c
b/drivers/usb/misc/usbtest.c
index
f7be4dc
..
2fb1fae
100644
(file)
--- a/
drivers/usb/misc/usbtest.c
+++ b/
drivers/usb/misc/usbtest.c
@@
-802,6
+802,7
@@
error:
switch (status) {
case -EINPROGRESS:
case -EBUSY:
switch (status) {
case -EINPROGRESS:
case -EBUSY:
+ case -EIDRM:
continue;
default:
dbg ("urb unlink --> %d", status);
continue;
default:
dbg ("urb unlink --> %d", status);
@@
-1038,8
+1039,6
@@
static void unlink1_callback (struct urb *urb, struct pt_regs *regs)
if (!status)
status = usb_submit_urb (urb, SLAB_ATOMIC);
if (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);
}
urb->status = status;
complete ((struct completion *) urb->context);
}
@@
-1074,11
+1073,12
@@
static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async)
/* unlinking that should always work. variable delay tests more
* hcd states and code paths, even with little other system load.
*/
/* 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);
retry:
retval = usb_unlink_urb (urb);
- if (retval == -EBUSY) {
+ if (retval == -EBUSY
|| retval == -EIDRM
) {
/* we can't unlink urbs while they're completing.
/* 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.
*/
* "normal" drivers would prevent resubmission, but
* since we're testing unlink paths, we can't.
*/