Heiner Kallweit <hkallwe...@gmail.com> : [...] > 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)
netif_running() returns true before rtl_open(): issuing rtl_reset_work() synchronously against uninitialized rings right at the start of rtl_open() won't work as expected. pm_runtime_get_sync() could be issued later in rtl_open() (but I would not mind something different with runtime_{resume/suspend} in open/close). -- Ueimor