From 7e0e62431259b02a9c035f6cbaec2635add30921 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 14 Mar 2020 10:15:48 +0000 Subject: net: dsa: mv88e6xxx: fix Serdes link changes phylink_mac_change() is supposed to be called with a 'false' argument if the link has gone down since it was last reported up; this is to ensure that link events along with renegotiation events are always correctly reported to userspace. Read the BMSR once when we have an interrupt, and report the link latched status to phylink via phylink_mac_change(). phylink will deal automatically with re-reading the link state once it has processed the link-down event. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6xxx/serdes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/dsa/mv88e6xxx/serdes.h') diff --git a/drivers/net/dsa/mv88e6xxx/serdes.h b/drivers/net/dsa/mv88e6xxx/serdes.h index a0c95322987d..7990cadba4c2 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.h +++ b/drivers/net/dsa/mv88e6xxx/serdes.h @@ -48,6 +48,7 @@ /* 1000BASE-X and SGMII */ #define MV88E6390_SGMII_BMCR (0x2000 + MII_BMCR) +#define MV88E6390_SGMII_BMSR (0x2000 + MII_BMSR) #define MV88E6390_SGMII_ADVERTISE (0x2000 + MII_ADVERTISE) #define MV88E6390_SGMII_LPA (0x2000 + MII_LPA) #define MV88E6390_SGMII_INT_ENABLE 0xa001 -- cgit