]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit49c60132c2600c4fa546efed7cacf00046c57faf
tree733bf5965d56e916e3d8cc57a56fc016b061b5e4
parente3ea57b62bc8700637b315f7d93390e33b540b5e
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