]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: add rtl_disable_exit_l1()
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 28 Jan 2022 20:41:42 +0000 (21:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Jan 2022 11:32:20 +0000 (11:32 +0000)
commitd192181c2ccbeb6403397b070b82676d9d665ec2
tree4ba7fee283243009c592266dea8a146a71813f1e
parent73c105ad2a3e142d81fc59761ce8353d0b211b8f
r8169: add rtl_disable_exit_l1()

Add rtl_disable_exit_l1() for ensuring that the chip doesn't
inadvertently exit ASPM L1 when being in a low-power mode.
The new function is called from rtl_prepare_power_down() which
has to be moved in the code to avoid a forward declaration.

According to Realtek OCP register 0xc0ac shadows ERI register 0xd4
on RTL8168 versions from RTL8168g. This allows to simplify the
code a little.

v2:
- call rtl_disable_exit_l1() also if DASH or WoL are enabled

Suggested-by: Chun-Hao Lin <hau@realtek.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c