2022-01-05 15:51:32

by Aaron Ma

[permalink] [raw]
Subject: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"

This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5.

This change breaks multiple usb to ethernet dongles attached on Lenovo
USB hub.

Signed-off-by: Aaron Ma <[email protected]>
---
drivers/net/usb/r8152.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

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 &&
--
2.30.2



2022-01-05 16:01:41

by Oliver Neukum

[permalink] [raw]
Subject: Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"


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


2022-01-05 17:36:28

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"

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

2022-01-05 18:20:13

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

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 <[email protected]>
>
> [...]

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



2022-01-05 19:09:41

by Henning Schild

[permalink] [raw]
Subject: Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"

Am Thu, 6 Jan 2022 00:05:28 +0800
schrieb Aaron Ma <[email protected]>:

> 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
> >