OSDN Git Service

net: phylink: re-implement interface configuration with PCS
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 21 Jul 2020 11:04:41 +0000 (12:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:46:51 +0000 (15:46 -0700)
commitb7ad14c2fe2d4b2abee491e3adfa3d0123aa2d8c
tree0e30d2ffbf9f374ea79898118395a7e7f6f39ecc
parent1571e700fd610c39e8b50b0110b1ee9badb2fe6a
net: phylink: re-implement interface configuration with PCS

With PCS support, how we implement interface reconfiguration (or other
major reconfiguration) is not up to the job; we end up reconfiguring
the PCS for an interface change while the link could potentially be up.
In order to solve this, add two additional MAC methods for major
configuration, one to prepare for the change, and one to finish the
change.

This allows mvneta and mvpp2 to shutdown what they require prior to the
MAC and PCS configuration calls, and then restart as appropriate.

This impacts ksettings_set(), which now needs to identify whether the
change is a minor tweak to the advertisement masks or whether the
interface mode has changed, and call the appropriate function for that
update.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h