diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
| commit | 6396fc3b3ff3f6b942992b653a62df11dcef9bea (patch) | |
| tree | db3c7cbe833b43c653adc99f70941431c5ff7c4e /drivers/usb/misc/usbtest.c | |
| parent | 4785879e4d340e24e54f6de2ccfc42728b912808 (diff) | |
| parent | 3d30701b58970425e1d45994d6cb82f828924fdd (diff) | |
Merge branch 'master' into for-next
Conflicts:
fs/exofs/inode.c
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
| -rw-r--r-- | drivers/usb/misc/usbtest.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 16dffe99d9f1..eef370eb7a54 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
| @@ -136,7 +136,7 @@ try_iso: | |||
| 136 | iso_out = e; | 136 | iso_out = e; |
| 137 | } | 137 | } |
| 138 | } | 138 | } |
| 139 | if ((in && out) || (iso_in && iso_out)) | 139 | if ((in && out) || iso_in || iso_out) |
| 140 | goto found; | 140 | goto found; |
| 141 | } | 141 | } |
| 142 | return -EINVAL; | 142 | return -EINVAL; |
| @@ -162,6 +162,9 @@ found: | |||
| 162 | dev->in_iso_pipe = usb_rcvisocpipe (udev, | 162 | dev->in_iso_pipe = usb_rcvisocpipe (udev, |
| 163 | iso_in->desc.bEndpointAddress | 163 | iso_in->desc.bEndpointAddress |
| 164 | & USB_ENDPOINT_NUMBER_MASK); | 164 | & USB_ENDPOINT_NUMBER_MASK); |
| 165 | } | ||
| 166 | |||
| 167 | if (iso_out) { | ||
| 165 | dev->iso_out = &iso_out->desc; | 168 | dev->iso_out = &iso_out->desc; |
| 166 | dev->out_iso_pipe = usb_sndisocpipe (udev, | 169 | dev->out_iso_pipe = usb_sndisocpipe (udev, |
| 167 | iso_out->desc.bEndpointAddress | 170 | iso_out->desc.bEndpointAddress |
| @@ -1378,7 +1381,6 @@ static void iso_callback (struct urb *urb) | |||
| 1378 | break; | 1381 | break; |
| 1379 | } | 1382 | } |
| 1380 | } | 1383 | } |
| 1381 | simple_free_urb (urb); | ||
| 1382 | 1384 | ||
| 1383 | ctx->pending--; | 1385 | ctx->pending--; |
| 1384 | if (ctx->pending == 0) { | 1386 | if (ctx->pending == 0) { |
| @@ -1495,6 +1497,7 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, | |||
| 1495 | } | 1497 | } |
| 1496 | 1498 | ||
| 1497 | simple_free_urb (urbs [i]); | 1499 | simple_free_urb (urbs [i]); |
| 1500 | urbs[i] = NULL; | ||
| 1498 | context.pending--; | 1501 | context.pending--; |
| 1499 | context.submit_error = 1; | 1502 | context.submit_error = 1; |
| 1500 | break; | 1503 | break; |
| @@ -1504,6 +1507,10 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, | |||
| 1504 | 1507 | ||
| 1505 | wait_for_completion (&context.done); | 1508 | wait_for_completion (&context.done); |
| 1506 | 1509 | ||
| 1510 | for (i = 0; i < param->sglen; i++) { | ||
| 1511 | if (urbs[i]) | ||
| 1512 | simple_free_urb(urbs[i]); | ||
| 1513 | } | ||
| 1507 | /* | 1514 | /* |
| 1508 | * Isochronous transfers are expected to fail sometimes. As an | 1515 | * Isochronous transfers are expected to fail sometimes. As an |
| 1509 | * arbitrary limit, we will report an error if any submissions | 1516 | * arbitrary limit, we will report an error if any submissions |
| @@ -1548,6 +1555,7 @@ fail: | |||
| 1548 | * off just killing the userspace task and waiting for it to exit. | 1555 | * off just killing the userspace task and waiting for it to exit. |
| 1549 | */ | 1556 | */ |
| 1550 | 1557 | ||
| 1558 | /* No BKL needed */ | ||
| 1551 | static int | 1559 | static int |
| 1552 | usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) | 1560 | usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) |
| 1553 | { | 1561 | { |
| @@ -2170,7 +2178,7 @@ static struct usb_driver usbtest_driver = { | |||
| 2170 | .name = "usbtest", | 2178 | .name = "usbtest", |
| 2171 | .id_table = id_table, | 2179 | .id_table = id_table, |
| 2172 | .probe = usbtest_probe, | 2180 | .probe = usbtest_probe, |
| 2173 | .ioctl = usbtest_ioctl, | 2181 | .unlocked_ioctl = usbtest_ioctl, |
| 2174 | .disconnect = usbtest_disconnect, | 2182 | .disconnect = usbtest_disconnect, |
| 2175 | .suspend = usbtest_suspend, | 2183 | .suspend = usbtest_suspend, |
| 2176 | .resume = usbtest_resume, | 2184 | .resume = usbtest_resume, |
