[PATCH net-next 0/3] introduce generic phylink validation
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2021-11-15 10:01:31
Hi, The various validate method implementations we have in phylink users have been quite repetitive but also prone to bugs. These patches introduce a generic implementation which relies solely on the supported_interfaces bitmap introduced during last cycle, and in the first patch, a bit array of MAC capabilities. MAC drivers are free to continue to do their own thing if they have special requirements - such as mvneta and mvpp2 which do not support 1000base-X without AN enabled. Most implementations currently in the kernel can be converted to call phylink_generic_validate() directly from the phylink MAC operations structure once they fill in the supported_interfaces and mac_capabilities members of phylink_config. This series introduces the generic implementation, and converts mvneta and mvpp2 to use it. drivers/net/ethernet/marvell/mvneta.c | 34 +--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 58 +----- drivers/net/phy/phylink.c | 252 ++++++++++++++++++++++++ include/linux/phylink.h | 31 +++ 4 files changed, 296 insertions(+), 79 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!