diff options
author | Huang Rui <ray.huang@amd.com> | 2013-11-04 17:11:53 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-09 05:42:45 +0400 |
commit | c952a8ba7136505cd1ca01735cc748ddc08c7d2f (patch) | |
tree | 0a41eba5cf36e92c8caf4e0f1523480ab93f8935 /drivers/usb/misc/usbtest.c | |
parent | 2e30d14f12421f39329faefd5ae92b02cc9ff255 (diff) | |
download | linux-c952a8ba7136505cd1ca01735cc748ddc08c7d2f.tar.xz |
usb: usbtest: add a test case to support bos for queue control
In Test 10 of usbtest module, it queues multiple control messages and
thereby tests control message queuing, protocol stalls, short reads, and
fault handling. And this patch add a test case to support queue BOS control
request for USB 3.0 SPEC.
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.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index b4152820d655..f3c31363c40a 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -944,7 +944,7 @@ struct ctrl_ctx { int last; }; -#define NUM_SUBCASES 15 /* how many test subcases here? */ +#define NUM_SUBCASES 16 /* how many test subcases here? */ struct subcase { struct usb_ctrlrequest setup; @@ -1218,6 +1218,15 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) } expected = -EREMOTEIO; break; + case 15: + req.wValue = cpu_to_le16(USB_DT_BOS << 8); + if (udev->bos) + len = le16_to_cpu(udev->bos->desc->wTotalLength); + else + len = sizeof(struct usb_bos_descriptor); + if (udev->speed != USB_SPEED_SUPER) + expected = -EPIPE; + break; default: ERROR(dev, "bogus number of ctrl queue testcases!\n"); context.status = -EINVAL; |