Skip to content

Commit

Permalink
r8152: Add MAC passthrough support to new device
Browse files Browse the repository at this point in the history
Device 0xa387 also supports MAC passthrough, therefore add it to the
whitelst.

BugLink: https://bugs.launchpad.net/bugs/1827961/comments/30
Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
khfeng authored and davem330 committed Feb 4, 2020
1 parent 599be01 commit b4b771f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,9 @@ enum rtl8152_flags {
#define VENDOR_ID_NVIDIA 0x0955
#define VENDOR_ID_TPLINK 0x2357

#define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2 0x3082
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387

#define MCU_TYPE_PLA 0x0100
#define MCU_TYPE_USB 0x0000

Expand Down Expand Up @@ -6759,9 +6762,13 @@ static int rtl8152_probe(struct usb_interface *intf,
netdev->hw_features &= ~NETIF_F_RXCSUM;
}

if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO &&
le16_to_cpu(udev->descriptor.idProduct) == 0x3082)
set_bit(LENOVO_MACPASSTHRU, &tp->flags);
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:
set_bit(LENOVO_MACPASSTHRU, &tp->flags);
}
}

if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
(!strcmp(udev->serial, "000001000000") ||
Expand Down

0 comments on commit b4b771f

Please sign in to comment.