Subject: Re: [PATCH net] net: phy: Fix qca8081 with speeds lower than 2.5Gb/s

From: "Russell King (Oracle)" <[email-masked]>
Date: Sun, 30 Jan 2022 12:40:57 +0000

On Sun, Jan 30, 2022 at 10:25:28AM +0000, Jonathan McDowell wrote:
> A typo in qca808x_read_status means we try to set SMII mode on the port
> rather than SGMII when the link speed is not 2.5Gb/s. This results in no
> traffic due to the mismatch in configuration between the phy and the
> mac.
> 
> Fixes: 79c7bc0521545 ("net: phy: add qca8081 read_status")
> Signed-off-by: Jonathan McDowell <[email-masked]>
> ---
>  drivers/net/phy/at803x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index 5b6c0d120e09..7077e3a92d31 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -1691,7 +1691,7 @@ static int qca808x_read_status(struct phy_device *phydev)
>  	if (phydev->link && phydev->speed == SPEED_2500)
>  		phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
>  	else
> -		phydev->interface = PHY_INTERFACE_MODE_SMII;
> +		phydev->interface = PHY_INTERFACE_MODE_SGMII;

Is it intentional to set the interface to SGMII also when there is no
link?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!