netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY
@ 2023-02-08 11:44 Horatiu Vultur
  2023-02-08 12:39 ` Andrew Lunn
  2023-02-10  6:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Horatiu Vultur @ 2023-02-08 11:44 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
	Horatiu Vultur

Add support for cable diagnostics in lan8841 PHY. It has the same
registers layout as lan8814 PHY, therefore reuse the functionality.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/phy/micrel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 01677c28e4079..727de4f4a14db 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -378,6 +378,8 @@ static const struct kszphy_type lan8841_type = {
 	.disable_dll_tx_bit	= BIT(14),
 	.disable_dll_rx_bit	= BIT(14),
 	.disable_dll_mask	= BIT_MASK(14),
+	.cable_diag_reg		= LAN8814_CABLE_DIAG,
+	.pair_mask		= LAN8814_WIRE_PAIR_MASK,
 };
 
 static int kszphy_extended_write(struct phy_device *phydev,
@@ -3520,6 +3522,7 @@ static struct phy_driver ksphy_driver[] = {
 	.phy_id		= PHY_ID_LAN8841,
 	.phy_id_mask	= MICREL_PHY_ID_MASK,
 	.name		= "Microchip LAN8841 Gigabit PHY",
+	.flags		= PHY_POLL_CABLE_TEST,
 	.driver_data	= &lan8841_type,
 	.config_init	= lan8841_config_init,
 	.probe		= lan8841_probe,
@@ -3531,6 +3534,8 @@ static struct phy_driver ksphy_driver[] = {
 	.get_stats	= kszphy_get_stats,
 	.suspend	= genphy_suspend,
 	.resume		= genphy_resume,
+	.cable_test_start	= lan8814_cable_test_start,
+	.cable_test_get_status	= ksz886x_cable_test_get_status,
 }, {
 	.phy_id		= PHY_ID_KSZ9131,
 	.phy_id_mask	= MICREL_PHY_ID_MASK,
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY
  2023-02-08 11:44 [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY Horatiu Vultur
@ 2023-02-08 12:39 ` Andrew Lunn
  2023-02-10  6:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2023-02-08 12:39 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: netdev, linux-kernel, hkallweit1, linux, davem, edumazet, kuba,
	pabeni

On Wed, Feb 08, 2023 at 12:44:06PM +0100, Horatiu Vultur wrote:
> Add support for cable diagnostics in lan8841 PHY. It has the same
> registers layout as lan8814 PHY, therefore reuse the functionality.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY
  2023-02-08 11:44 [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY Horatiu Vultur
  2023-02-08 12:39 ` Andrew Lunn
@ 2023-02-10  6:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-10  6:40 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: netdev, linux-kernel, andrew, hkallweit1, linux, davem, edumazet,
	kuba, pabeni

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 8 Feb 2023 12:44:06 +0100 you wrote:
> Add support for cable diagnostics in lan8841 PHY. It has the same
> registers layout as lan8814 PHY, therefore reuse the functionality.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  drivers/net/phy/micrel.c | 5 +++++
>  1 file changed, 5 insertions(+)

Here is the summary with links:
  - [net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY
    https://git.kernel.org/netdev/net-next/c/a136391ae421

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] 3+ messages in thread

end of thread, other threads:[~2023-02-10  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 11:44 [PATCH net-next] net: micrel: Cable Diagnostics feature for lan8841 PHY Horatiu Vultur
2023-02-08 12:39 ` Andrew Lunn
2023-02-10  6:40 ` 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).