diff options
author | Martin Fuzzey <mfuzzey@gmail.com> | 2010-09-30 18:20:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:22:01 -0400 |
commit | 40aed5241e4e5363c11acc841f6ef794b2c25668 (patch) | |
tree | 6ab73dfce9ac458af0f96a918a6f55aee59fc662 /drivers/usb/misc | |
parent | fabbf2196d0db0b4d175456dcb373aa2440f5728 (diff) |
USB: usbtest - ensure correct isoc data length
Check the data length of isochronous transfers is
as expected.
With this test #16 will now fail if the device side
sends no data.
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index bb078ebb8e81..a35b427c0bac 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1371,6 +1371,8 @@ static void iso_callback(struct urb *urb) | |||
1371 | ctx->errors += urb->error_count; | 1371 | ctx->errors += urb->error_count; |
1372 | else if (urb->status != 0) | 1372 | else if (urb->status != 0) |
1373 | ctx->errors += urb->number_of_packets; | 1373 | ctx->errors += urb->number_of_packets; |
1374 | else if (urb->actual_length != urb->transfer_buffer_length) | ||
1375 | ctx->errors++; | ||
1374 | 1376 | ||
1375 | if (urb->status == 0 && ctx->count > (ctx->pending - 1) | 1377 | if (urb->status == 0 && ctx->count > (ctx->pending - 1) |
1376 | && !ctx->submit_error) { | 1378 | && !ctx->submit_error) { |