All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume
@ 2018-05-21 17:01 Heiner Kallweit
  2018-05-21 21:24 ` Francois Romieu
  2018-05-22 17:59 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Heiner Kallweit @ 2018-05-21 17:01 UTC (permalink / raw)
  To: David Miller, Realtek linux nic maintainers; +Cc: netdev@vger.kernel.org

The driver uses pm_runtime_get_sync() in few places and relies on the
device being fully runtime-resumed after this call. So far however
the runtime resume callback triggers an asynchronous reset. 
Avoid this and perform the reset synchronously.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 75dfac024..1eb4f625a 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7327,9 +7327,9 @@ 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);
+	if (netif_running(dev))
+		rtl_reset_work(tp);
 	rtl_unlock_work(tp);
-
-	rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 }
 
 static int rtl8169_resume(struct device *device)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-22 22:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21 17:01 [PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume Heiner Kallweit
2018-05-21 21:24 ` Francois Romieu
2018-05-21 22:38   ` Heiner Kallweit
2018-05-22 17:59 ` David Miller
2018-05-22 22:51   ` Francois Romieu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.