[PATCH CFT net-next 0/6] net: stmmac/xpcs: modernise PCS support
Russell King (Oracle)
linux at armlinux.org.uk
Thu Dec 16 05:11:40 PST 2021
Hi,
This series updates xpcs and stmmac for the recent changes to phylink
to better support split PCS and to get rid of private MAC validation
functions.
This series is slightly more involved than other conversions as stmmac
has already had optional proper split PCS support.
The patches:
1) Provide a function to query the xpcs for the interface modes that
are supported.
2) Populates the MAC capabilities and switches stmmac_validate() to use
phylink_get_linkmodes(). We do not use phylink_generic_validate() yet
as (a) we do not always have the supported interfaces populated, and
(b) the existing code does not restrict based on interface. There
should be no functional effect from this patch.
3) Populates phylink's supported interfaces from the xpcs when the xpcs
is configured by firmware and also the firmware configured interface
mode. Note: this will restrict stmmac to only supporting these
interfaces modes - stmmac maintainers need to verify that this
behaviour is acceptable.
4) stmmac_validate() tail-calls xpcs_validate(), but we don't need it to
now that PCS have their own validation method. Convert stmmac and
xpcs to use this method instead.
5) xpcs sets the poll field of phylink_pcs to true, meaning xpcs
requires its status to be polled. There is no need to also set the
phylink_config.pcs_poll. Remove this.
6) Switch to phylink_generic_validate(). This is probably the most
contravertial change in this patch set as this will cause the MAC to
restrict link modes based on the interface mode. From an inspection
of the xpcs driver, this should be safe, as XPCS only further
restricts the link modes to a subset of these (whether that is
correct or not is not an issue I am addressing here.) For
implementations that do not use xpcs, this is a more open question
and needs feedback from stmmac maintainers.
Please review and test this series. Thanks!
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 144 ++++++----------------
drivers/net/pcs/pcs-xpcs.c | 41 +++---
include/linux/pcs/pcs-xpcs.h | 3 +-
3 files changed, 67 insertions(+), 121 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list