net: dsa: felix: Set USXGMII link based on BMSR, not LPA
authorAlex Marginean <alexandru.marginean@nxp.com>
Thu, 16 Jan 2020 18:05:06 +0000 (20:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jan 2020 12:14:21 +0000 (13:14 +0100)
At least some PHYs (AQR412) don't advertise copper-side link status
during system side AN.

So remove this duplicate assignment to pcs->link and rely on the
previous one for link state: the local indication from the MAC PCS.

Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")
Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c

index 03482616faa7c6887cc569bae31f180e6a3508ae..1e82b0d72058948aba7c211c2fd7bea09fbe3648 100644 (file)
@@ -892,7 +892,6 @@ static void vsc9959_pcs_link_state_usxgmii(struct phy_device *pcs,
                break;
        }
 
-       pcs->link = USXGMII_LPA_LNKS(lpa);
        if (USXGMII_LPA_DUPLEX(lpa))
                pcs->duplex = DUPLEX_FULL;
        else