Add support for Clause-45 PHY Loopback
Subsystems (4)
cover Add support for Clause-45 PHY Loopback
This patch series add support for Clause-45 PHY loopback.
It involves adding a generic API in the PHY framework, which can be accessed by all C45 PHY drivers using the .set_loopback callback.
Also, enable PHY loopback for the Marvell 88x3310/88x2110 driver.
Wong Vee Khee (2):
net: phy: add genphy_c45_loopback
net: phy: marvell10g: Add PHY loopback support
drivers/net/phy/marvell10g.c | 2 ++ drivers/net/phy/phy-c45.c | 8 ++++++++ include/linux/phy.h | 1 + 3 files changed, 11 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/2 net: phy: add genphy_c45_loopback
Add generic code to enable C45 PHY loopback into the common phy-c45.c file. This will allow C45 PHY drivers aceess this by setting .set_loopback.
--- drivers/net/phy/phy-c45.c | 8 ++++++++ include/linux/phy.h | 1 + 2 files changed, 9 insertions(+)
drivers/net/phy/phy-c45.c +8 -0
@@ -560,6 +560,14 @@ int gen10g_config_aneg(struct phy_device *phydev) }EXPORT_SYMBOL_GPL (gen10g_config_aneg); +int genphy_c45_loopback (struct phy_device *phydev,bool enable) +{ +return phy_modify_mmd (phydev,MDIO_MMD_PCS ,MDIO_CTRL1 , +MDIO_PCS_CTRL1_LOOPBACK , + enable ?MDIO_PCS_CTRL1_LOOPBACK :0 ); +} +EXPORT_SYMBOL_GPL (genphy_c45_loopback); +struct phy_driver genphy_c45_driver = { .phy_id =0xffffffff , .phy_id_mask =0xffffffff ,
include/linux/phy.h +1 -0
@@ -1532,6 +1532,7 @@ int genphy_c45_read_mdix(struct phy_device *phydev);int genphy_c45_pma_read_abilities (struct phy_device *phydev);int genphy_c45_read_status (struct phy_device *phydev);int genphy_c45_config_aneg (struct phy_device *phydev); +int genphy_c45_loopback (struct phy_device *phydev,bool enable);/* Generic C45 PHY driver */ extern struct phy_driver genphy_c45_driver;
Signature · 1 line
2.25.1
Re: [PATCH net-next 1/2] net: phy: add genphy_c45_loopback
Quoted 11 lines · Wong Vee Khee
Add generic code to enable C45 PHY loopback into the common
phy-c45.cfile. This will allow C45 PHY drivers aceess this by setting .set_loopback.Suggested-by Heiner Kallweit <[email protected]>Signed-off-by Wong Vee Khee <[email protected]>--- drivers/net/phy/phy-c45.c | 8 ++++++++ include/linux/phy.h | 1 + 2 files changed, 9 insertions(+)
LGTM
Re: [PATCH net-next 1/2] net: phy: add genphy_c45_loopback
In reply to Wong Vee KheeQuoted 6 lines · Wong Vee Khee
Add generic code to enable C45 PHY loopback into the common
phy-c45.cfile. This will allow C45 PHY drivers aceess this by setting .set_loopback.Suggested-by Heiner Kallweit <[email protected]>Signed-off-by Wong Vee Khee <[email protected]>
Andrew
PATCH 2/2 net: phy: marvell10g: Add PHY loopback support
In reply to Wong Vee KheeAdd support for PHY loopback for Marvell 88x2110 and Marvell 88x3310.
This allow user to perform PHY loopback test using ethtool selftest.
--- drivers/net/phy/marvell10g.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/phy/marvell10g.c +2 -0
@@ -781,6 +781,7 @@ static struct phy_driver mv3310_drivers[] = { .get_tunable = mv3310_get_tunable, .set_tunable = mv3310_set_tunable, .remove = mv3310_remove, + .set_loopback = genphy_c45_loopback, }, { .phy_id = MARVELL_PHY_ID_88E2110,
@@ -796,6 +797,7 @@ static struct phy_driver mv3310_drivers[] = { .get_tunable = mv3310_get_tunable, .set_tunable = mv3310_set_tunable, .remove = mv3310_remove, + .set_loopback = genphy_c45_loopback, }, };
Signature · 1 line
2.25.1
Re: [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support
Quoted 5 lines · Wong Vee Khee
Add support for PHY loopback for Marvell 88x2110 and Marvell 88x3310.
This allow user to perform PHY loopback test using ethtool selftest.
Signed-off-by Wong Vee Khee <[email protected]>
Andrew
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Wed, 24 Mar 2021 00:46:39 +0800 you wrote:
This patch series add support for Clause-45 PHY loopback.
It involves adding a generic API in the PHY framework, which can be accessed by all C45 PHY drivers using the .set_loopback callback.
Also, enable PHY loopback for the Marvell 88x3310/88x2110 driver.
[...]
Here is the summary with links:
- [net-next,1/2] net: phy: add genphy_c45_loopback
https://git.kernel.org/netdev/net-next/c/0ef25ed104ac - [net-next,2/2] net: phy: marvell10g: Add PHY loopback support https://git.kernel.org/netdev/net-next/c/d137c70d0e7a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html