]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
authorAaron Ma <aaron.ma@canonical.com>
Wed, 5 Jan 2022 15:51:02 +0000 (23:51 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Jan 2022 18:11:40 +0000 (10:11 -0800)
This reverts commit e0c8f2bce6168d884eefc482de051795eaea49c0.

This change breaks multiple usb to ethernet dongles attached on Lenovo
USB hub.

Fixes: e0c8f2bce616 ("net: usb: r8152: Add MAC passthrough support for more Lenovo Docks")
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Link: https://lore.kernel.org/r/20220105155102.8557-1-aaron.ma@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/r8152.c

index 3085e8118d7fa7b7c16da711a76e968c4c6ce968..ef6010a3d33ad883fa87dd8f410e620a332b59bb 100644 (file)
@@ -9638,9 +9638,12 @@ static int rtl8152_probe(struct usb_interface *intf,
                netdev->hw_features &= ~NETIF_F_RXCSUM;
        }
 
-       if (udev->parent &&
-                       le16_to_cpu(udev->parent->descriptor.idVendor) == VENDOR_ID_LENOVO) {
-               tp->lenovo_macpassthru = 1;
+       if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) {
+               switch (le16_to_cpu(udev->descriptor.idProduct)) {
+               case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2:
+               case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
+                       tp->lenovo_macpassthru = 1;
+               }
        }
 
        if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&