aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2014-05-22 06:06:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 19:23:43 -0400
commita7683eb3af6df30e3a3f3666d834e9abba8f5c22 (patch)
tree70e242757551fabb656392089a76fde7ebcbccf1 /drivers/usb/misc/usbtest.c
parente4d58f5dcb7d7be45df8def31881ebfae99c75da (diff)
usb: usbtest: add pattern check on pipe in phase of unlink read
TEST 11 unlinks the URB read request for N times. When host and gadget both initialize pattern 1 (mod 63) data series to do IN transfer, the host side function should check the data buffer if it is as mod 63 series, because the data packet which host receivced will follow pattern 1. So this patch adds this checking action. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 4ed457edde23..51a6da256772 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1345,6 +1345,9 @@ static int unlink1(struct usbtest_dev *dev, int pipe, int size, int async)
1345 while (!completion_done(&completion)) { 1345 while (!completion_done(&completion)) {
1346 retval = usb_unlink_urb(urb); 1346 retval = usb_unlink_urb(urb);
1347 1347
1348 if (retval == 0 && usb_pipein(urb->pipe))
1349 retval = simple_check_buf(dev, urb);
1350
1348 switch (retval) { 1351 switch (retval) {
1349 case -EBUSY: 1352 case -EBUSY:
1350 case -EIDRM: 1353 case -EIDRM: