diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-01-19 22:06:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-19 16:09:14 -0800 |
commit | 58ba566ccbae0ec629ab9e36006d1b79765fe252 (patch) | |
tree | 3fcc7928b2998df186c4daacd2582888d20d4e13 /drivers | |
parent | df320ed7b3e46c93a57eb77c71228415bcd5b8b8 (diff) | |
download | linux-58ba566ccbae0ec629ab9e36006d1b79765fe252.tar.bz2 |
r8169: reset chip synchronously in __rtl8169_resume
Triggering an asynchronous reset is problematic for the following
reasons, therefore reset the chip synchronously.
- The reset routine resets registers and parameters behind our back
what may collide with code executed after triggering the reset.
- __rtl8169_resume() is called as part of pm_runtime_get_sync() and
callers expect that the chip is fully resumed afterwards.
In context of this driver triggering an asynchonous reset should be
considered an emergency procedure.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index a3df61d81adf..c7a89d2a8bfe 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -6787,9 +6787,8 @@ static void __rtl8169_resume(struct net_device *dev) rtl_lock_work(tp); napi_enable(&tp->napi); set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags); + rtl_reset_work(tp); rtl_unlock_work(tp); - - rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); } static int rtl8169_resume(struct device *device) |