net: phy: micrel: fix KSZ8081/KSZ8091 cable test
Subsystems (4)
PATCH 1/1 net: phy: micrel: fix KSZ8081/KSZ8091 cable test
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.
--- drivers/net/phy/micrel.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/phy/micrel.c +2 -0
@@ -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,
Signature · 1 line
2.50.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 5 lines · On Thu, 24 Jul 2025 00:20:42 +0200 you wrote:
Commit
21b688dabecb("net: phy: micrel: Cable Diag feature for lan8814 phy") introducedcable_testsupport for the LAN8814 that reuses parts of the KSZ886x logic and introduced thecable_diag_regandpair_maskparameters to account for differences between those chips.
Quoted 7 lines
However, it did not update the
ksz8081_typestruct, so those members are now 0, causing no pairs to be tested inksz886x_cable_test_get_statusandksz886x_cable_test_wait_for_completionto 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html