PHYLIB: Fix forcing mode reduction
Subsystems (3)
cover PHYLIB: Fix forcing mode reduction
Quoted 3 lines · Andy Fleming
Looks good. Feel free to send these patches to [email protected] (you may need to subscribe), and copy Jeff Garzik <[email protected]>.
This fixes a problem seen when a port without a cable connected would repeatedly print out "Trying 1000/HALF". While in the PHY_FORCING state, the call to phy_read_status() was resetting the value of phydev->speed and phydev->duplex, preventing it from incrementally trying the speed/duplex variations.
Since we really just want the link status updated for the PHY_FORCING state, calling genphy_update_link() instead of phy_read_status() fixes this issue.
Patch tested on a MPC8540 platform with a BCM5421 PHY.
---
drivers/net/phy/phy.c +1 -1
@@ -767,7 +783,7 @@ }break ;case PHY_FORCING : - err =phy_read_status (phydev); + err =genphy_update_link (phydev);if (err)break ;
drivers/net/phy/phy_device.c +1 -0
@@ -417,6 +417,7 @@return 0 ; } +EXPORT_SYMBOL (genphy_update_link);/* genphy_read_status *
Jeff,
Any status on accepting this patch, I've got some additional fixes that are based on having access to genphy_update_link()
- kumar
Quoted 49 lines · Nathaniel Case
Quoted 3 lines · Andy Fleming
Looks good. Feel free to send these patches to [email protected] (you may need to subscribe), and copy Jeff Garzik <[email protected]>.
This fixes a problem seen when a port without a cable connected would repeatedly print out "Trying 1000/HALF". While in the
PHY_FORCINGstate, the call tophy_read_status()was resetting the value ofphydev->speedandphydev->duplex, preventing it from incrementally trying the speed/duplex variations.Since we really just want the link status updated for the
PHY_FORCINGstate, callinggenphy_update_link()instead ofphy_read_status()fixes this issue.Patch tested on a MPC8540 platform with a BCM5421 PHY.
Signed-off-by Nate Case <[email protected]>Signed-off-by Andy Fleming <[email protected]>---
drivers/net/phy/phy.c +1
-1@@ -767,7 +783,7 @@ }break ;case PHY_FORCING : - err =phy_read_status (phydev); + err =genphy_update_link (phydev);if (err)break ;drivers/net/phy/phy_device.c +1
-1@@ -417,6 +417,7 @@return 0 ; } +EXPORT_SYMBOL (genphy_update_link);/* genphy_read_status * -To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html