linux_dsm_epyc7002/drivers/net/ethernet/realtek
Kai-Heng Feng 6ad5690199 r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing RTL_FLAG_TASK_ENABLED
After system suspend, sometimes the r8169 doesn't work when ethernet
cable gets pluggued.

This issue happens because rtl_reset_work() doesn't get called from
rtl8169_runtime_resume(), after system suspend.

In rtl_task(), RTL_FLAG_TASK_* only gets cleared if this condition is
met:
if (!netif_running(dev) ||
    !test_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags))
    ...

If RTL_FLAG_TASK_ENABLED was cleared during system suspend while
RTL_FLAG_TASK_RESET_PENDING was set, the next rtl_schedule_task() won't
schedule task as the flag is still there.

So in addition to clearing RTL_FLAG_TASK_ENABLED, also clears other
flags.

Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-12 00:05:33 -07:00
..
8139cp.c 8139cp: Replace WARN_ONCE with netdev_WARN_ONCE 2018-01-08 20:53:15 -05:00
8139too.c 8139too: Remove unnecessary netif_napi_del() 2018-05-25 16:35:45 -04:00
atp.c drivers/net: realtek: Convert timers to use timer_setup() 2017-10-27 12:09:16 +09:00
atp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig r8169: add missing Kconfig dependency 2018-08-17 12:24:13 -07:00
Makefile
r8169.c r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing RTL_FLAG_TASK_ENABLED 2018-09-12 00:05:33 -07:00