aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 9dcb68f04f03..055b84adedac 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1028,7 +1028,10 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param)
1028 case 13: /* short read, resembling case 10 */ 1028 case 13: /* short read, resembling case 10 */
1029 req.wValue = cpu_to_le16((USB_DT_CONFIG << 8) | 0); 1029 req.wValue = cpu_to_le16((USB_DT_CONFIG << 8) | 0);
1030 /* last data packet "should" be DATA1, not DATA0 */ 1030 /* last data packet "should" be DATA1, not DATA0 */
1031 len = 1024 - udev->descriptor.bMaxPacketSize0; 1031 if (udev->speed == USB_SPEED_SUPER)
1032 len = 1024 - 512;
1033 else
1034 len = 1024 - udev->descriptor.bMaxPacketSize0;
1032 expected = -EREMOTEIO; 1035 expected = -EREMOTEIO;
1033 break; 1036 break;
1034 case 14: /* short read; try to fill the last packet */ 1037 case 14: /* short read; try to fill the last packet */
@@ -1387,11 +1390,15 @@ static int test_halt(struct usbtest_dev *tdev, int ep, struct urb *urb)
1387 1390
1388static int halt_simple(struct usbtest_dev *dev) 1391static int halt_simple(struct usbtest_dev *dev)
1389{ 1392{
1390 int ep; 1393 int ep;
1391 int retval = 0; 1394 int retval = 0;
1392 struct urb *urb; 1395 struct urb *urb;
1396 struct usb_device *udev = testdev_to_usbdev(dev);
1393 1397
1394 urb = simple_alloc_urb(testdev_to_usbdev(dev), 0, 512); 1398 if (udev->speed == USB_SPEED_SUPER)
1399 urb = simple_alloc_urb(udev, 0, 1024);
1400 else
1401 urb = simple_alloc_urb(udev, 0, 512);
1395 if (urb == NULL) 1402 if (urb == NULL)
1396 return -ENOMEM; 1403 return -ENOMEM;
1397 1404