xhci: set slot context speed field to SuperSpeedPlus for USB 3.1 SSP devices
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 25 Jan 2016 13:30:47 +0000 (15:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 21:20:54 +0000 (13:20 -0800)
The speed field of the input slot context should represent the speed the
device is working at.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci.h

index 9c3da214a515a425d4447e634dc93786e4719575..42f2bec759aae95dc31d5448e2e5ee0e750b6f25 100644 (file)
@@ -1106,6 +1106,9 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
        slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(1) | udev->route);
        switch (udev->speed) {
        case USB_SPEED_SUPER_PLUS:
+               slot_ctx->dev_info |= cpu_to_le32(SLOT_SPEED_SSP);
+               max_packets = MAX_PACKET(512);
+               break;
        case USB_SPEED_SUPER:
                slot_ctx->dev_info |= cpu_to_le32(SLOT_SPEED_SS);
                max_packets = MAX_PACKET(512);
index 9be7348872baab804691c7fd10f31115a0c7e3fe..9f28bea65fedc1d2c8aba3a78b252470e7224934 100644 (file)
@@ -343,6 +343,7 @@ struct xhci_op_regs {
 #define        SLOT_SPEED_LS           (XDEV_LS << 10)
 #define        SLOT_SPEED_HS           (XDEV_HS << 10)
 #define        SLOT_SPEED_SS           (XDEV_SS << 10)
+#define        SLOT_SPEED_SSP          (XDEV_SSP << 10)
 /* Port Indicator Control */
 #define PORT_LED_OFF   (0 << 14)
 #define PORT_LED_AMBER (1 << 14)