summaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-05-01 16:14:21 -0400
committerDavid S. Miller <davem@davemloft.net>2019-05-04 00:50:58 -0400
commitf24098f80748ea95d53603a7bb7954a41bb3ca1b (patch)
tree733bf5965d56e916e3d8cc57a56fc016b061b5e4 /include/linux/phy.h
parent22c0ef6b1475aef4765efc4aa764b8580018123c (diff)
net: phy: improve resuming from hibernation
I got an interesting report [0] that after resuming from hibernation the link has 100Mbps instead of 1Gbps. Reason is that another OS has been used whilst Linux was hibernated. And this OS speeds down the link due to WoL. Therefore, when resuming, we shouldn't expect that what the PHY advertises is what it did when hibernating. Easiest way to do this is removing state PHY_RESUMING. Instead always go via PHY_UP that configures PHY advertisement. [0] https://bugzilla.kernel.org/show_bug.cgi?id=202851 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 4a03f8a46d33..073fb151b5a9 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -308,13 +308,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr);
308 * 308 *
309 * HALTED: PHY is up, but no polling or interrupts are done. Or 309 * HALTED: PHY is up, but no polling or interrupts are done. Or
310 * PHY is in an error state. 310 * PHY is in an error state.
311 * 311 * - phy_start moves to UP
312 * - phy_start moves to RESUMING
313 *
314 * RESUMING: PHY was halted, but now wants to run again.
315 * - If we are forcing, or aneg is done, timer moves to RUNNING
316 * - If aneg is not done, timer moves to AN
317 * - phy_stop moves to HALTED
318 */ 312 */
319enum phy_state { 313enum phy_state {
320 PHY_DOWN = 0, 314 PHY_DOWN = 0,
@@ -324,7 +318,6 @@ enum phy_state {
324 PHY_RUNNING, 318 PHY_RUNNING,
325 PHY_NOLINK, 319 PHY_NOLINK,
326 PHY_FORCING, 320 PHY_FORCING,
327 PHY_RESUMING
328}; 321};
329 322
330/** 323/**