]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: microchip: Reset LAN88xx PHY to ensure clean link state on LAN7800/7850
authorOleksij Rempel <o.rempel@pengutronix.de>
Mon, 25 Nov 2024 08:40:50 +0000 (09:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:05 +0000 (20:03 +0100)
commit3027a9fe02eda2e7c08f46100456d10deb5940c0
tree629c7e58dae7ceb4656fee8458ffb8c41c429f02
parentddc6402e2934bdd3ce3731c7965511f14c8c66d3
net: phy: microchip: Reset LAN88xx PHY to ensure clean link state on LAN7800/7850

[ Upstream commit ccb989e4d1efe0dd81b28c437443532d80d9ecee ]

Fix outdated MII_LPA data in the LAN88xx PHY, which is used in LAN7800
and LAN7850 USB Ethernet controllers. Due to a hardware limitation, the
PHY cannot reliably update link status after parallel detection when the
link partner does not support auto-negotiation. To mitigate this, add a
PHY reset in `lan88xx_link_change_notify()` when `phydev->state` is
`PHY_NOLINK`, ensuring the PHY starts in a clean state and reports
accurate fixed link parallel detection results.

Fixes: 792aec47d59d9 ("add microchip LAN88xx phy driver")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20241125084050.414352-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/microchip.c