On Thu, Mar 04, 2021 at 12:56:53PM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean <vladimir.olt...@nxp.com> > > When using MLO_AN_PHY or MLO_AN_FIXED, the MII_BMCR of the SGMII PCS is > read before resetting the switch so it can be reprogrammed afterwards. > This works for the speeds of 1Gbps and 100Mbps, but not for 10Mbps, > because SPEED_10 is actually 0, so AND-ing anything with 0 is false, > therefore that last branch is dead code. > > Do what others do (genphy_read_status_fixed, phy_mii_ioctl) and just > remove the check for SPEED_10, let it fall into the default case. > > Fixes: ffe10e679cec ("net: dsa: sja1105: Add support for the SGMII port") > Signed-off-by: Vladimir Oltean <vladimir.olt...@nxp.com>
Reviewed-by: Andrew Lunn <and...@lunn.ch> Andrew