* [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback
@ 2021-03-23 16:46 Wong Vee Khee
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Wong Vee Khee @ 2021-03-23 16:46 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
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(+)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/2] net: phy: add genphy_c45_loopback
2021-03-23 16:46 [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback Wong Vee Khee
@ 2021-03-23 16:46 ` Wong Vee Khee
2021-03-24 11:02 ` Heiner Kallweit
2021-03-24 22:04 ` Andrew Lunn
2021-03-23 16:46 ` [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support Wong Vee Khee
2021-03-24 23:30 ` [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback patchwork-bot+netdevbpf
2 siblings, 2 replies; 7+ messages in thread
From: Wong Vee Khee @ 2021-03-23 16:46 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
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.
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
---
drivers/net/phy/phy-c45.c | 8 ++++++++
include/linux/phy.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 077f2929c45e..91e3acb9e397 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -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,
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 1a12e4436b5b..8e2cf84b2318 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -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;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support
2021-03-23 16:46 [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback Wong Vee Khee
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
@ 2021-03-23 16:46 ` Wong Vee Khee
2021-03-24 22:04 ` Andrew Lunn
2021-03-24 23:30 ` [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Wong Vee Khee @ 2021-03-23 16:46 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
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 <vee.khee.wong@linux.intel.com>
---
drivers/net/phy/marvell10g.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index b1bb9b8e1e4e..74b64e52ffa2 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -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,
},
};
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: add genphy_c45_loopback
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
@ 2021-03-24 11:02 ` Heiner Kallweit
2021-03-24 22:04 ` Andrew Lunn
1 sibling, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2021-03-24 11:02 UTC (permalink / raw)
To: Wong Vee Khee, Andrew Lunn, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
On 23.03.2021 17:46, Wong Vee Khee wrote:
> 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.
>
> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> ---
> drivers/net/phy/phy-c45.c | 8 ++++++++
> include/linux/phy.h | 1 +
> 2 files changed, 9 insertions(+)
>
LGTM
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: add genphy_c45_loopback
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
2021-03-24 11:02 ` Heiner Kallweit
@ 2021-03-24 22:04 ` Andrew Lunn
1 sibling, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-03-24 22:04 UTC (permalink / raw)
To: Wong Vee Khee
Cc: Heiner Kallweit, Russell King, David S . Miller, Jakub Kicinski,
netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
On Wed, Mar 24, 2021 at 12:46:40AM +0800, Wong Vee Khee wrote:
> 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.
>
> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support
2021-03-23 16:46 ` [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support Wong Vee Khee
@ 2021-03-24 22:04 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-03-24 22:04 UTC (permalink / raw)
To: Wong Vee Khee
Cc: Heiner Kallweit, Russell King, David S . Miller, Jakub Kicinski,
netdev, linux-kernel, Voon Weifeng, Ong Boon Leong
On Wed, Mar 24, 2021 at 12:46:41AM +0800, Wong Vee Khee wrote:
> 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 <vee.khee.wong@linux.intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback
2021-03-23 16:46 [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback Wong Vee Khee
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
2021-03-23 16:46 ` [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support Wong Vee Khee
@ 2021-03-24 23:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-24 23:30 UTC (permalink / raw)
To: Wong Vee Khee
Cc: andrew, hkallweit1, linux, davem, kuba, netdev, linux-kernel,
weifeng.voon, boon.leong.ong
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-24 23:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 16:46 [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback Wong Vee Khee
2021-03-23 16:46 ` [PATCH net-next 1/2] net: phy: add genphy_c45_loopback Wong Vee Khee
2021-03-24 11:02 ` Heiner Kallweit
2021-03-24 22:04 ` Andrew Lunn
2021-03-23 16:46 ` [PATCH net-next 2/2] net: phy: marvell10g: Add PHY loopback support Wong Vee Khee
2021-03-24 22:04 ` Andrew Lunn
2021-03-24 23:30 ` [PATCH net-next 0/2] Add support for Clause-45 PHY Loopback patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).