Skip to content

Commit 2dfa4e3

Browse files
committed
Merge branch 'net-phy-microchip-lan88xx-reliability-fixes'
Oleksij Rempel says: ==================== net: phy: microchip: LAN88xx reliability fixes This patch series improves the reliability of the Microchip LAN88xx PHYs, particularly in edge cases involving fixed link configurations or forced speed modes. Patch 1 assigns genphy_soft_reset() to the .soft_reset hook to ensure that stale link partner advertisement (LPA) bits are properly cleared during reconfiguration. Without this, outdated autonegotiation bits may remain visible in some parallel detection cases. Patch 2 restricts the 100 Mbps workaround (originally intended to handle cable length switching) to only run when the link transitions to the PHY_NOLINK state. This prevents repeated toggling that can confuse autonegotiating link partners such as the Intel i350, leading to unstable link cycles. Both patches were tested on a LAN7850 (with integrated LAN88xx PHY) against an Intel I350 NIC. The full test suite - autonegotiation, fixed link, and parallel detection - passed successfully. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 01b8114 + dd4360c commit 2dfa4e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/phy/microchip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static void lan88xx_link_change_notify(struct phy_device *phydev)
332332
* As workaround, set to 10 before setting to 100
333333
* at forced 100 F/H mode.
334334
*/
335-
if (!phydev->autoneg && phydev->speed == 100) {
335+
if (phydev->state == PHY_NOLINK && !phydev->autoneg && phydev->speed == 100) {
336336
/* disable phy interrupt */
337337
temp = phy_read(phydev, LAN88XX_INT_MASK);
338338
temp &= ~LAN88XX_INT_MASK_MDINTPIN_EN_;
@@ -488,6 +488,7 @@ static struct phy_driver microchip_phy_driver[] = {
488488
.config_init = lan88xx_config_init,
489489
.config_aneg = lan88xx_config_aneg,
490490
.link_change_notify = lan88xx_link_change_notify,
491+
.soft_reset = genphy_soft_reset,
491492

492493
/* Interrupt handling is broken, do not define related
493494
* functions to force polling.

0 commit comments

Comments
 (0)