Skip to content

Commit

Permalink
net: usb: r8152: Add MAC passthrough support for more Lenovo Docks
Browse files Browse the repository at this point in the history
Like ThinkaPad Thunderbolt 4 Dock, more Lenovo docks start to use the original
Realtek USB ethernet chip ID 0bda:8153.

Lenovo Docks always use their own IDs for usb hub, even for older Docks.
If parent hub is from Lenovo, then r8152 should try MAC passthrough.
Verified on Lenovo TBT3 dock too.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
pyma1 authored and davem330 committed Nov 17, 2021
1 parent 9311cce commit f77b83b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -9603,12 +9603,9 @@ static int rtl8152_probe(struct usb_interface *intf,
netdev->hw_features &= ~NETIF_F_RXCSUM;
}

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 (udev->parent &&
le16_to_cpu(udev->parent->descriptor.idVendor) == VENDOR_ID_LENOVO) {
tp->lenovo_macpassthru = 1;
}

if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
Expand Down

0 comments on commit f77b83b

Please sign in to comment.