]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: fix Serdes link changes
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 14 Mar 2020 10:15:48 +0000 (10:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2020 00:11:12 +0000 (17:11 -0700)
commite424e52f6e8298173f65042714f62e5a80f8c0b0
tree70fb2fa02fdfdbef7756b7d7788419d0eb11dafd
parent860d703ec5b21bcfce9fa7f9ce189b53d1b6c5aa
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 <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/serdes.c
drivers/net/dsa/mv88e6xxx/serdes.h