Skip to content

Commit 06f20cd

Browse files
pmhahngregkh
authored andcommitted
cdc_ether|r8152: ThinkPad Hybrid USB-C/A Dock quirk
[ Upstream commit a07f23a ] Lenovo ThinkPad Hybrid USB-C with USB-A Dock (17ef:a359) is affected by the same problem as the Lenovo Powered USB-C Travel Hub (17ef:721e): Both are based on the Realtek RTL8153B chip used to use the cdc_ether driver. However, using this driver, with the system suspended the device constantly sends pause-frames as soon as the receive buffer fills up. This causes issues with other devices, where some Ethernet switches stop forwarding packets altogether. Using the Realtek driver (r8152) fixes this issue. Pause frames are no longer sent while the host system is suspended. Cc: Leon Schuermann <leon@is.currently.online> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Oliver Neukum <oliver@neukum.org> (maintainer:USB CDC ETHERNET DRIVER) Cc: netdev@vger.kernel.org (open list:NETWORKING DRIVERS) Link: https://git.kernel.org/netdev/net/c/cb82a54904a9 Link: https://git.kernel.org/netdev/net/c/2284bbd0cf39 Link: https://www.lenovo.com/de/de/p/accessories-and-software/docking/docking-usb-docks/40af0135eu Signed-off-by: Philipp Hahn <phahn-oss@avm.de> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://patch.msgid.link/484336aad52d14ccf061b535bc19ef6396ef5120.1741601523.git.p.hahn@avm.de Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 362a90c commit 06f20cd

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

drivers/net/usb/cdc_ether.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,13 @@ static const struct usb_device_id products[] = {
782782
.driver_info = 0,
783783
},
784784

785+
/* Lenovo ThinkPad Hybrid USB-C with USB-A Dock (40af0135eu, based on Realtek RTL8153) */
786+
{
787+
USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0xa359, USB_CLASS_COMM,
788+
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
789+
.driver_info = 0,
790+
},
791+
785792
/* Aquantia AQtion USB to 5GbE Controller (based on AQC111U) */
786793
{
787794
USB_DEVICE_AND_INTERFACE_INFO(AQUANTIA_VENDOR_ID, 0xc101,

drivers/net/usb/r8152.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ enum rtl8152_flags {
784784
#define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c
785785
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387
786786
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062
787+
#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK 0xa359
787788

788789
struct tally_counter {
789790
__le64 tx_packets;
@@ -9734,6 +9735,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev)
97349735
case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
97359736
case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3:
97369737
case DEVICE_ID_THINKPAD_USB_C_DONGLE:
9738+
case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK:
97379739
return 1;
97389740
}
97399741
} else if (vendor_id == VENDOR_ID_REALTEK && parent_vendor_id == VENDOR_ID_LENOVO) {
@@ -10011,6 +10013,8 @@ static const struct usb_device_id rtl8152_table[] = {
1001110013
{ USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927) },
1001210014
{ USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0c5e) },
1001310015
{ USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101) },
10016+
10017+
/* Lenovo */
1001410018
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x304f) },
1001510019
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3054) },
1001610020
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3062) },
@@ -10021,7 +10025,9 @@ static const struct usb_device_id rtl8152_table[] = {
1002110025
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x720c) },
1002210026
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) },
1002310027
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) },
10028+
{ USB_DEVICE(VENDOR_ID_LENOVO, 0xa359) },
1002410029
{ USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) },
10030+
1002510031
{ USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) },
1002610032
{ USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) },
1002710033
{ USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) },

drivers/net/usb/r8153_ecm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ static const struct usb_device_id products[] = {
135135
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
136136
.driver_info = (unsigned long)&r8153_info,
137137
},
138+
/* Lenovo ThinkPad Hybrid USB-C with USB-A Dock (40af0135eu, based on Realtek RTL8153) */
139+
{
140+
USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ID_LENOVO, 0xa359, USB_CLASS_COMM,
141+
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
142+
.driver_info = (unsigned long)&r8153_info,
143+
},
138144

139145
{ }, /* END */
140146
};

0 commit comments

Comments
 (0)