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>
This commit is contained in:
parent
fabbf2196d
commit
40aed5241e
|
@ -1371,6 +1371,8 @@ static void iso_callback(struct urb *urb)
|
||||||
ctx->errors += urb->error_count;
|
ctx->errors += urb->error_count;
|
||||||
else if (urb->status != 0)
|
else if (urb->status != 0)
|
||||||
ctx->errors += urb->number_of_packets;
|
ctx->errors += urb->number_of_packets;
|
||||||
|
else if (urb->actual_length != urb->transfer_buffer_length)
|
||||||
|
ctx->errors++;
|
||||||
|
|
||||||
if (urb->status == 0 && ctx->count > (ctx->pending - 1)
|
if (urb->status == 0 && ctx->count > (ctx->pending - 1)
|
||||||
&& !ctx->submit_error) {
|
&& !ctx->submit_error) {
|
||||||
|
|
Loading…
Reference in New Issue