Message ID | 20220105155102.8557-1-aaron.ma@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 00fcf8c7dd564c44448ff6a39728d2ca0c8efbd8 |
Headers | show |
Series | Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks" | expand |
On 05.01.22 16:51, Aaron Ma wrote: > This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. > > This change breaks multiple usb to ethernet dongles attached on Lenovo > USB hub. Hi, now we should maybe discuss a sensible way to identify device that should use passthrough. Are your reasons to not have a list of devices maintainability or is it impossible? Regards Oliver
On 1/6/22 00:01, Oliver Neukum wrote: > > On 05.01.22 16:51, Aaron Ma wrote: >> This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. >> >> This change breaks multiple usb to ethernet dongles attached on Lenovo >> USB hub. > > Hi, > > now we should maybe discuss a sensible way to identify device > that should use passthrough. Are your reasons to not have a list > of devices maintainability or is it impossible? > The USB to ethernet ID is 0bda:8153. It's is original Realtek 8153 ID. It's impossible. And ocp data are 0. No way to identify it's from dock. Aaron > Regards > Oliver >
On Thu, Jan 06, 2022 at 12:05:28AM +0800, Aaron Ma wrote: > > On 1/6/22 00:01, Oliver Neukum wrote: > > > > On 05.01.22 16:51, Aaron Ma wrote: > > > This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. > > > > > > This change breaks multiple usb to ethernet dongles attached on Lenovo > > > USB hub. > > > > Hi, > > > > now we should maybe discuss a sensible way to identify device > > that should use passthrough. Are your reasons to not have a list > > of devices maintainability or is it impossible? > > > > The USB to ethernet ID is 0bda:8153. It's is original Realtek 8153 ID. > It's impossible. > > And ocp data are 0. > No way to identify it's from dock. Can you at least identify the dock? Can you have a udev rule which matches on 0bda:8153, it then walks up the tree and checks if it is part of the dock? And it is on the expected port of the hub within the dock, and not a USB stick plugged into the dock on some other port of the hub? Andrew
Hello: This patch was applied to netdev/net.git (master) by Jakub Kicinski <kuba@kernel.org>: On Wed, 5 Jan 2022 23:51:02 +0800 you wrote: > This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. > > This change breaks multiple usb to ethernet dongles attached on Lenovo > USB hub. > > Signed-off-by: Aaron Ma <aaron.ma@canonical.com> > > [...] Here is the summary with links: - Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks" https://git.kernel.org/netdev/net/c/00fcf8c7dd56 You are awesome, thank you!
Am Thu, 6 Jan 2022 00:05:28 +0800 schrieb Aaron Ma <aaron.ma@canonical.com>: > On 1/6/22 00:01, Oliver Neukum wrote: > > > > On 05.01.22 16:51, Aaron Ma wrote: > >> This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. > >> > >> This change breaks multiple usb to ethernet dongles attached on > >> Lenovo USB hub. > > > > Hi, > > > > now we should maybe discuss a sensible way to identify device > > that should use passthrough. Are your reasons to not have a list > > of devices maintainability or is it impossible? > > > > The USB to ethernet ID is 0bda:8153. It's is original Realtek 8153 ID. > It's impossible. > > And ocp data are 0. > No way to identify it's from dock. Is that revert you giving up on the other one? Maybe these IDs offer a way after all. One of my offending devices is a idVendor=13b1, idProduct=0041 from Linksys so probably clearly not Lenovo, was just plugged into a Lenovo hub. The other one is a idVendor=17ef, idProduct=7214 so actually a Lenovo travel hub. And probably rightfully getting a pass-thru ... if we want to keep that feature in the kernel and not push it out to udev (for all vendors) Anyhow, it seems like the revert is coming. And i will disable that feature in the BIOS to be sure. But i will be happy to test further patches. regards, Henning > Aaron > > > Regards > > Oliver > >
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f9877a3e83ac..4a02f33f0643 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -9603,9 +9603,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 &&
This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5. This change breaks multiple usb to ethernet dongles attached on Lenovo USB hub. Signed-off-by: Aaron Ma <aaron.ma@canonical.com> --- drivers/net/usb/r8152.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)