usb: set root hub lane counts
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 19 Apr 2018 16:05:52 +0000 (19:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2018 14:19:26 +0000 (16:19 +0200)
Set the the rx_lane and tx_lane count to "2" for USB 3.2 hosts.
For all other older hosts set the default lane counts to 1

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

index 5a799f84dcc211e8c1dcfc7ba1c9683fca00ee06..ac5bcf449d7d419e7dc717d48c7a1c4f01071658 100644 (file)
@@ -2793,6 +2793,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
        hcd->self.root_hub = rhdev;
        mutex_unlock(&usb_port_peer_mutex);
 
+       rhdev->rx_lanes = 1;
+       rhdev->tx_lanes = 1;
+
        switch (hcd->speed) {
        case HCD_USB11:
                rhdev->speed = USB_SPEED_FULL;
@@ -2807,6 +2810,8 @@ int usb_add_hcd(struct usb_hcd *hcd,
                rhdev->speed = USB_SPEED_SUPER;
                break;
        case HCD_USB32:
+               rhdev->rx_lanes = 2;
+               rhdev->tx_lanes = 2;
        case HCD_USB31:
                rhdev->speed = USB_SPEED_SUPER_PLUS;
                break;