Commit c952a8ba7136505cd1ca01735cc748ddc08c7d2f
Committed by
Greg Kroah-Hartman
1 parent
2e30d14f12
Exists in
master
and in
16 other branches
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>
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
drivers/usb/misc/usbtest.c
... | ... | @@ -944,7 +944,7 @@ |
944 | 944 | int last; |
945 | 945 | }; |
946 | 946 | |
947 | -#define NUM_SUBCASES 15 /* how many test subcases here? */ | |
947 | +#define NUM_SUBCASES 16 /* how many test subcases here? */ | |
948 | 948 | |
949 | 949 | struct subcase { |
950 | 950 | struct usb_ctrlrequest setup; |
... | ... | @@ -1217,6 +1217,15 @@ |
1217 | 1217 | break; |
1218 | 1218 | } |
1219 | 1219 | expected = -EREMOTEIO; |
1220 | + break; | |
1221 | + case 15: | |
1222 | + req.wValue = cpu_to_le16(USB_DT_BOS << 8); | |
1223 | + if (udev->bos) | |
1224 | + len = le16_to_cpu(udev->bos->desc->wTotalLength); | |
1225 | + else | |
1226 | + len = sizeof(struct usb_bos_descriptor); | |
1227 | + if (udev->speed != USB_SPEED_SUPER) | |
1228 | + expected = -EPIPE; | |
1220 | 1229 | break; |
1221 | 1230 | default: |
1222 | 1231 | ERROR(dev, "bogus number of ctrl queue testcases!\n"); |