PHYLIB: Fix forcing mode reduction
Status from this message: NAK, needs an EXPORT
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | PHYLIB: Add get_link ethtool helper functiondrivers/ include/ | +17 | 2 replies | |
| 2/2 | PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link opdrivers/ | +13 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] 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 *