Skip to contentSkip to conversation

Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"

PATCH Applied Aaron Ma 5 participants 6 messages Jan 5, 2022

Subsystems (4)
lore
Share & tools
lore

Aaron Ma

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/usb/r8152.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/usb/r8152.c +6 -3
index f9877a3e83ac..4a02f33f0643 100644
@@ -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 &&
Signature · 1 line
2.30.2
#1 lore raw
Quoted 4 lines · Aaron Ma

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

author
#2 lore raw
Quoted 4 lines · Oliver Neukum
Quoted 2 lines · Aaron Ma

This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5.

Quoted 9 lines
Quoted 2 lines

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

Quoted 3 lines

    Regards
        Oliver

#3 lore raw
Quoted 16 lines · Aaron Ma
Quoted 4 lines · Oliver Neukum
Quoted 2 lines · Aaron Ma

This reverts commit f77b83b5bbab53d2be339184838b19ed2c62c0a5.

Quoted 9 lines
Quoted 2 lines

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?

Quoted 5 lines

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

#4 lore raw
In reply to Aaron Ma

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

Quoted 15 lines · Oliver Neukum
Quoted 13 lines · Aaron Ma
Quoted 4 lines

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?

Quoted 5 lines

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

Quoted 5 lines

Aaron

Quoted 3 lines

    Regards
        Oliver

#5 lore raw
In reply to Aaron Ma
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

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

Quoted 8 lines · 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.

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html