[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Aug 2023 15:06:52 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mark parsed interface mode for legacy
switch drivers
Hi Russell,
On Tue, Aug 08, 2023 at 12:12:16PM +0100, Russell King (Oracle) wrote:
> If we successfully parsed an interface mode with a legacy switch
> driver, populate that mode into phylink's supported interfaces rather
> than defaulting to the internal and gmii interfaces.
>
> This hasn't caused an issue so far, because when the interface doesn't
> match a supported one, phylink_validate() doesn't clear the supported
> mask, but instead returns -EINVAL. phylink_parse_fixedlink() doesn't
> check this return value, and merely relies on the supported ethtool
> link modes mask being cleared. Therefore, the fixed link settings end
> up being allowed despite validation failing.
>
> Before this causes a problem, arrange for DSA to more accurately
> populate phylink's supported interfaces mask so validation can
> correctly succeed.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
How did you notice this? Is there any unconverted DSA switch which has a
phy-mode which isn't PHY_INTERFACE_MODE_INTERNAL or PHY_INTERFACE_MODE_NA?
Powered by blists - more mailing lists