usb: usbtest: update bos test coverage to usb 2.1 device
authorHuang Rui <ray.huang@amd.com>
Wed, 13 Nov 2013 14:35:13 +0000 (22:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 01:42:45 +0000 (17:42 -0800)
The commit "usb: usbtest: support bos descriptor test for usb 3.0"
introduced a test for bos descriptor. And USB 2.1 device also can be
checked. So this patch extends the test coverage to support USB 2.1 device.

Reported-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbtest.c

index 0b5c3b15753064c4aa8d89249ff028b95edc3e45..bff058ea222e046fd01b5383e756bff6e745036b 100644 (file)
@@ -763,7 +763,7 @@ static int ch9_postconfig(struct usbtest_dev *dev)
         * there's always [9.4.3] a bos device descriptor [9.6.2] in USB
         * 3.0 spec
         */
-       if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0300) {
+       if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0210) {
                struct usb_bos_descriptor *bos = NULL;
                struct usb_dev_cap_header *header = NULL;
                unsigned total, num, length;