net: phy: improve resuming from hibernation
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 1 May 2019 20:14:21 +0000 (22:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 May 2019 04:50:58 +0000 (00:50 -0400)
commitf24098f80748ea95d53603a7bb7954a41bb3ca1b
tree733bf5965d56e916e3d8cc57a56fc016b061b5e4
parent22c0ef6b1475aef4765efc4aa764b8580018123c
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>
drivers/net/phy/phy.c
include/linux/phy.h