]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
usb: core: hub: Print speed name based on ssp rate
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 11 Mar 2021 03:43:01 +0000 (19:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Mar 2021 12:12:43 +0000 (13:12 +0100)
Check for usb_device->ssp_rate to print the SuperSpeed Plus signaling
rate generation and lane count.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/df0986bbe92251c104dd92e3c796df7c4f2674ce.1615432770.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c

index 823470607d58f85ea22b9708911207ae92a8e320..9a83390072daa47c16301304d75ab1a42979e8f4 100644 (file)
@@ -4830,9 +4830,13 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
                                                "%s SuperSpeed%s%s USB device number %d using %s\n",
                                                (udev->config) ? "reset" : "new",
                                         (udev->speed == USB_SPEED_SUPER_PLUS) ?
-                                                       "Plus Gen 2" : " Gen 1",
-                                        (udev->rx_lanes == 2 && udev->tx_lanes == 2) ?
-                                                       "x2" : "",
+                                                       " Plus" : "",
+                                        (udev->ssp_rate == USB_SSP_GEN_2x2) ?
+                                                       " Gen 2x2" :
+                                        (udev->ssp_rate == USB_SSP_GEN_2x1) ?
+                                                       " Gen 2x1" :
+                                        (udev->ssp_rate == USB_SSP_GEN_1x2) ?
+                                                       " Gen 1x2" : "",
                                         devnum, driver_name);
                        }