r8169: fix handling ether_clk
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 1 Oct 2020 06:44:19 +0000 (08:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Oct 2020 19:35:21 +0000 (12:35 -0700)
commitbb13a800620c2b9046187facdf7dfd45699f5a74
tree67dafc03888db8645588e7531e48db49af1a7bec
parenta59cf619787e628b31c310367f869fde26c8ede1
r8169: fix handling ether_clk

Petr reported that system freezes on r8169 driver load on a system
using ether_clk. The original change was done under the assumption
that the clock isn't needed for basic operations like chip register
access. But obviously that was wrong.
Therefore effectively revert the original change, and in addition
leave the clock active when suspending and WoL is enabled. Chip may
not be able to process incoming packets otherwise.

Fixes: 9f0b54cd1672 ("r8169: move switching optional clock on/off to pll power functions")
Reported-by: Petr Tesarik <ptesarik@suse.cz>
Tested-by: Petr Tesarik <ptesarik@suse.cz>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c