Re: [PATCH net 1/1] net: stmmac: add check for supported link mode before mode change

From: Andrew Lunn
Date: Wed Nov 09 2022 - 12:02:47 EST


On Wed, Nov 09, 2022 at 10:43:29AM +0800, Noor Azura Ahmad Tarmizi wrote:
> From: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@xxxxxxxxx>
>
> Currently, change for unsupported speed and duplex are sent to the phy,
> rendering the link to unknown speed (link state down).

Something does not seem correct. See:

https://elixir.bootlin.com/linux/v6.1-rc4/source/drivers/net/phy/phy.c#L816

/* We make sure that we don't pass unsupported values in to the PHY */
linkmode_and(advertising, advertising, phydev->supported);

Do you somehow have phydev->supported set wrong?

Andrew