Commit c952a8ba authored by Huang Rui's avatar Huang Rui Committed by Greg Kroah-Hartman

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: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e30d14f
...@@ -944,7 +944,7 @@ struct ctrl_ctx { ...@@ -944,7 +944,7 @@ struct ctrl_ctx {
int last; int last;
}; };
#define NUM_SUBCASES 15 /* how many test subcases here? */ #define NUM_SUBCASES 16 /* how many test subcases here? */
struct subcase { struct subcase {
struct usb_ctrlrequest setup; struct usb_ctrlrequest setup;
...@@ -1218,6 +1218,15 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) ...@@ -1218,6 +1218,15 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param)
} }
expected = -EREMOTEIO; expected = -EREMOTEIO;
break; 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: default:
ERROR(dev, "bogus number of ctrl queue testcases!\n"); ERROR(dev, "bogus number of ctrl queue testcases!\n");
context.status = -EINVAL; context.status = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment