net: axienet: modernise pcs implementation
cover net: axienet: modernise pcs implementation
Hi,
These two patches modernise the Xilinx axienet PCS implementation to use the phylink split PCS support.
The first patch adds split PCS support and makes use of the newly introduced mac_select_pcs() function, which is the preferred way to conditionally attach a PCS.
The second patch cleans up the use of mdiobus_write() since we now have bus accessors for mdio devices.
There should be no functional change to the driver.
This series was previously sent CFT on the 16th December (message ID [email protected]), and feedback addressed. CFT v2 sent 4th January (message ID [email protected]).
drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 108 +++++++++++----------- 2 files changed, 55 insertions(+), 55 deletions(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
PATCH 1/2 net: axienet: convert to phylink_pcs
Convert axienet to use the phylink_pcs layer, resulting in it no longer being a legacy driver.
--- drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 + .../net/ethernet/xilinx/xilinx_axienet_main.c | 107 +++++++++--------- 2 files changed, 55 insertions(+), 54 deletions(-)
drivers/net/ethernet/xilinx/xilinx_axienet.h +2 -0
@@ -386,6 +386,7 @@ struct axidma_bd {* @phylink: Pointer to phylink instance * @phylink_config: phylink configuration settings * @pcs_phy: Reference to PCS/PMA PHY if used +* @pcs: phylink pcs structure for PCS PHY * @switch_x_sgmii: Whether switchable 1000BaseX/SGMII mode is enabled in the core * @axi_clk: AXI4-Lite bus clock * @misc_clks: Misc ethernet clocks (AXI4-Stream, Ref, MGT clocks)
@@ -434,6 +435,7 @@ struct axienet_local {struct phylink_config phylink_config;struct mdio_device *pcs_phy; +struct phylink_pcs pcs;bool switch_x_sgmii;
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +53 -54
152 lines not on this page · raw message
Signature · 1 line
2.30.2
PATCH 2/2 net: axienet: replace mdiobus_write() with mdiodev_write()
In reply to Russell King (Oracle)Commit 0ebecb2644c8 ("net: mdio: Add helper functions for accessing MDIO devices") added support for mdiodev accessor operations that neatly wrap the mdiobus accessor operations. Since we are dealing with a mdio device here, update the driver to use mdiodev_write().
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1 -2
@@ -1568,8 +1568,7 @@ static int axienet_pcs_config(struct phylink_pcs *pcs, unsigned int mode,int ret;if (lp->switch_x_sgmii) { - ret =mdiobus_write (pcs_phy->bus, pcs_phy->addr, -XLNX_MII_STD_SELECT_REG , + ret =mdiodev_write (pcs_phy,XLNX_MII_STD_SELECT_REG , interface ==PHY_INTERFACE_MODE_SGMII ?XLNX_MII_STD_SELECT_SGMII :0 );if (ret <0 ) {
Signature · 1 line
2.30.2
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 10 lines · On Tue, 25 Jan 2022 16:08:24 +0000 you wrote:
Hi,
These two patches modernise the Xilinx axienet PCS implementation to use the phylink split PCS support.
The first patch adds split PCS support and makes use of the newly introduced
mac_select_pcs()function, which is the preferred way to conditionally attach a PCS.[...]
Here is the summary with links:
- [net-next,1/2] net: axienet: convert to phylink_pcs
https://git.kernel.org/netdev/net-next/c/7a86be6a5135 - [net-next,2/2] net: axienet: replace mdiobus_write() with mdiodev_write() https://git.kernel.org/netdev/net-next/c/03854d8a7723
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html