]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: micrel: fix KSZ8081/KSZ8091 cable test
authorFlorian Larysch <fl@n621.de>
Wed, 23 Jul 2025 22:20:42 +0000 (00:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:48 +0000 (16:25 +0200)
commit610bcb13e9619a7d152972ecbe7cede5d46dd95a
treefaafe5ca4a57c8d5a461ed3523c8c6b7454eea5f
parentd42b71a34f6b8a2d5c53df81169b03b8d8b5cf4e
net: phy: micrel: fix KSZ8081/KSZ8091 cable test

commit 49db61c27c4bbd24364086dc0892bd3e14c1502e upstream.

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>
Link: https://patch.msgid.link/20250723222250.13960-1-fl@n621.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/micrel.c