]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb162c8b535c2e61c7297f0ee8549cccba8d8dd46
tree0e30d2ffbf9f374ea79898118395a7e7f6f39ecc
parent49d9b06b090f011187aa813bca390679a993f415
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