[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5130b4ec-9de8-3c1a-8ef7-99be9084c93b@gmail.com>
Date: Wed, 17 Jun 2020 22:52:47 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Realtek linux nic maintainers <nic_swsd@...ltek.com>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next 3/8] r8169: improve setting WoL on runtime-resume
In the following scenario WoL isn't configured properly:
- Driver is loaded, interface isn't brought up within 10s, so driver
runtime-suspends.
- WoL is set.
- Interface is brought up, stored WoL setting isn't applied.
It has always been like that, but the scenario seems to be quite
theoretical as I haven't seen any bug report yet. Therefore treat
the change as an improvement.
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 4bc6c5529..bd95c0ae6 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4887,14 +4887,12 @@ static int rtl8169_runtime_resume(struct device *device)
rtl_rar_set(tp, tp->dev->dev_addr);
- if (!tp->TxDescArray)
- return 0;
-
rtl_lock_work(tp);
__rtl8169_set_wol(tp, tp->saved_wolopts);
rtl_unlock_work(tp);
- __rtl8169_resume(tp);
+ if (tp->TxDescArray)
+ __rtl8169_resume(tp);
return 0;
}
--
2.27.0
Powered by blists - more mailing lists