Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

r8153_ecm: Add Lenovo Powered USB-C Hub as a fallback of r8152

This commit enables the use of the r8153_ecm driver, introduced with
commit c1aedf015ebdd0 ("net/usb/r8153_ecm: support ECM mode for
RTL8153") for the Lenovo Powered USB-C Hub (17ef:721e) based on the
Realtek RTL8153B chip.

This results in the following driver preference:

- if r8152 is available, use the r8152 driver
- if r8152 is not available, use the r8153_ecm driver

This is done to prevent the NIC from constantly sending pause frames
when the host system enters standby (fixed by using the r8152 driver
in "r8152: Add Lenovo Powered USB-C Travel Hub"), while still allowing
the device to work with the r8153_ecm driver as a fallback.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
Tested-by: Leon Schuermann <leon@is.currently.online>
Link: https://lore.kernel.org/r/20210111190312.12589-3-leon@is.currently.online
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Leon Schuermann and committed by
Jakub Kicinski
2284bbd0 cb82a549

+8
+8
drivers/net/usb/r8153_ecm.c
··· 122 122 }; 123 123 124 124 static const struct usb_device_id products[] = { 125 + /* Realtek RTL8153 Based USB 3.0 Ethernet Adapters */ 125 126 { 126 127 USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ID_REALTEK, 0x8153, USB_CLASS_COMM, 128 + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), 129 + .driver_info = (unsigned long)&r8153_info, 130 + }, 131 + 132 + /* Lenovo Powered USB-C Travel Hub (4X90S92381, based on Realtek RTL8153) */ 133 + { 134 + USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ID_LENOVO, 0x721e, USB_CLASS_COMM, 127 135 USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), 128 136 .driver_info = (unsigned long)&r8153_info, 129 137 },