Skip to content

Commit 49db61c

Browse files
florolfkuba-moo
authored andcommitted
net: phy: micrel: fix KSZ8081/KSZ8091 cable test
Commit 21b688d ("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: 21b688d ("net: phy: micrel: Cable Diag feature for lan8814 phy") Cc: [email protected] Signed-off-by: Florian Larysch <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1bbb76a commit 49db61c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/phy/micrel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,8 @@ static const struct kszphy_type ksz8051_type = {
472472

473473
static const struct kszphy_type ksz8081_type = {
474474
.led_mode_reg = MII_KSZPHY_CTRL_2,
475+
.cable_diag_reg = KSZ8081_LMD,
476+
.pair_mask = KSZPHY_WIRE_PAIR_MASK,
475477
.has_broadcast_disable = true,
476478
.has_nand_tree_disable = true,
477479
.has_rmii_ref_clk_sel = true,

0 commit comments

Comments
 (0)