[<prev] [next>] [day] [month] [year] [list]
Message-ID: <91983414-8df7-4cc0-9465-328d47024bcc@lunn.ch>
Date: Mon, 5 Jun 2023 22:00:57 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Fernando Eckhardt Valle (FIPT)" <fevalle@....br>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"jesse.brandeburg@...el.com" <jesse.brandeburg@...el.com>,
"anthony.l.nguyen@...el.com" <anthony.l.nguyen@...el.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] igc: enable Mac Address Passthrough in Lenovo
Thunderbolt 4 Docks
On Mon, Jun 05, 2023 at 07:47:43PM +0000, Fernando Eckhardt Valle (FIPT) wrote:
>
> Module parameters are very much frowned upon. Please try to find
> another solution.
>
> What does the copy of the MAC address? Can it signal when it is done,
> and when there is nothing to do?
>
>
> When the mac address passthrough feature is enabled in the computer's BIOS, it
> is necessary to copy the computer's mac address to the Ethernet device of the
> dock station. This way, the dock station's mac address will be the same as the
> computer's, and that's what should happen. However, this process is not given
> enough time to occur, hence the msleep(600), with this small delay, the dock is
> able to copy the computer's mac address.
>
> The parameters are precisely meant to avoid having to use msleep() every time
> the module is loaded.
MAC address passthrought seems in general to be a big collection of
vendor hacks which in general are broken in most corner cases, and
even in the middle cases. What really needs to happen is that the
vendors get together and standardize on one solution, and make sure
they involved the kernel developers in the design.
O.K, so why is the kernel involved? It sounds like userspace should be
solving this. It is easy for userspace to get a notification when the
dock pops into existence. It can then walk the tree of devices and
find that the IGC is in a dock, its the first dock, not the 42nd dock
in a long chain. User space also has access to the BIOS version so it
knows the BIOS will at some point execute this proprietary extension
and copy the MAC address to one of the docks, maybe even the correct
one in the chain of 42. It can wait 1 seconds, and then down/up the
interface?
Andrew
Powered by blists - more mailing lists