All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
@ 2022-01-05 15:51 Aaron Ma
  2022-01-05 16:01 ` Oliver Neukum
  2022-01-05 18:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Ma @ 2022-01-05 15:51 UTC (permalink / raw)
  To: aaron.ma, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai

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

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
  2022-01-05 15:51 [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks" Aaron Ma
@ 2022-01-05 16:01 ` Oliver Neukum
  2022-01-05 16:05   ` Aaron Ma
  2022-01-05 18:20 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2022-01-05 16:01 UTC (permalink / raw)
  To: Aaron Ma, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
  2022-01-05 16:01 ` Oliver Neukum
@ 2022-01-05 16:05   ` Aaron Ma
  2022-01-05 17:36     ` Andrew Lunn
  2022-01-05 19:09     ` Henning Schild
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Ma @ 2022-01-05 16:05 UTC (permalink / raw)
  To: Oliver Neukum, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai


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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
  2022-01-05 16:05   ` Aaron Ma
@ 2022-01-05 17:36     ` Andrew Lunn
  2022-01-05 19:09     ` Henning Schild
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2022-01-05 17:36 UTC (permalink / raw)
  To: Aaron Ma
  Cc: Oliver Neukum, kuba, henning.schild, linux-usb, netdev,
	linux-kernel, davem, hayeswang, tiwai

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
  2022-01-05 15:51 [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks" Aaron Ma
  2022-01-05 16:01 ` Oliver Neukum
@ 2022-01-05 18:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-05 18:20 UTC (permalink / raw)
  To: Aaron Ma
  Cc: kuba, henning.schild, linux-usb, netdev, linux-kernel, davem,
	hayeswang, tiwai

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
  2022-01-05 16:05   ` Aaron Ma
  2022-01-05 17:36     ` Andrew Lunn
@ 2022-01-05 19:09     ` Henning Schild
  1 sibling, 0 replies; 6+ messages in thread
From: Henning Schild @ 2022-01-05 19:09 UTC (permalink / raw)
  To: Aaron Ma
  Cc: Oliver Neukum, kuba, linux-usb, netdev, linux-kernel, davem,
	hayeswang, tiwai

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-05 19:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 15:51 [PATCH] Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks" Aaron Ma
2022-01-05 16:01 ` Oliver Neukum
2022-01-05 16:05   ` Aaron Ma
2022-01-05 17:36     ` Andrew Lunn
2022-01-05 19:09     ` Henning Schild
2022-01-05 18:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.