* [PATCH net] net: phy: micrel: fix KSZ8081/KSZ8091 cable test
@ 2025-07-23 22:20 Florian Larysch
2025-07-25 22:17 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Florian Larysch @ 2025-07-23 22:20 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
Divya.Koppera
Cc: netdev, linux-kernel, Florian Larysch, stable
Commit 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814
phy") introduced cable_test support for the LAN8814 that reuses parts of
the KSZ886x logic and introduced the cable_diag_reg and pair_mask
parameters to account for differences between those chips.
However, it did not update the ksz8081_type struct, so those members are
now 0, causing no pairs to be tested in ksz886x_cable_test_get_status
and ksz886x_cable_test_wait_for_completion to poll the wrong register
for the affected PHYs (Basic Control/Reset, which is 0 in normal
operation) and exit immediately.
Fix this by setting both struct members accordingly.
Fixes: 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814 phy")
Cc: stable@vger.kernel.org
Signed-off-by: Florian Larysch <fl@n621.de>
---
drivers/net/phy/micrel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 64aa03aed770..50c6a4e8cfa1 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -472,6 +472,8 @@ static const struct kszphy_type ksz8051_type = {
static const struct kszphy_type ksz8081_type = {
.led_mode_reg = MII_KSZPHY_CTRL_2,
+ .cable_diag_reg = KSZ8081_LMD,
+ .pair_mask = KSZPHY_WIRE_PAIR_MASK,
.has_broadcast_disable = true,
.has_nand_tree_disable = true,
.has_rmii_ref_clk_sel = true,
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: phy: micrel: fix KSZ8081/KSZ8091 cable test
2025-07-23 22:20 [PATCH net] net: phy: micrel: fix KSZ8081/KSZ8091 cable test Florian Larysch
@ 2025-07-25 22:17 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-25 22:17 UTC (permalink / raw)
To: Florian Larysch
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
Divya.Koppera, netdev, linux-kernel, stable
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 24 Jul 2025 00:20:42 +0200 you wrote:
> Commit 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814
> phy") introduced cable_test support for the LAN8814 that reuses parts of
> the KSZ886x logic and introduced the cable_diag_reg and pair_mask
> parameters to account for differences between those chips.
>
> However, it did not update the ksz8081_type struct, so those members are
> now 0, causing no pairs to be tested in ksz886x_cable_test_get_status
> and ksz886x_cable_test_wait_for_completion to poll the wrong register
> for the affected PHYs (Basic Control/Reset, which is 0 in normal
> operation) and exit immediately.
>
> [...]
Here is the summary with links:
- [net] net: phy: micrel: fix KSZ8081/KSZ8091 cable test
https://git.kernel.org/netdev/net/c/49db61c27c4b
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] 2+ messages in thread
end of thread, other threads:[~2025-07-25 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-23 22:20 [PATCH net] net: phy: micrel: fix KSZ8081/KSZ8091 cable test Florian Larysch
2025-07-25 22:17 ` 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).