r8169: enable napi on resume.
authorArtem Savkov <artem.savkov@gmail.com>
Tue, 3 Apr 2012 10:29:11 +0000 (10:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Apr 2012 23:08:40 +0000 (19:08 -0400)
NAPI is disabled during suspend and needs to be enabled on resume. Without
this the driver locks up during resume in rtl_reset_work() trying to disable
NAPI again.

Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index 7b23554f80b6c0f8540bccddea0c9ae31c75f35e..f54509377efad8354345176fdb9c1951a9fdd4de 100644 (file)
@@ -5810,7 +5810,10 @@ static void __rtl8169_resume(struct net_device *dev)
 
        rtl_pll_power_up(tp);
 
+       rtl_lock_work(tp);
+       napi_enable(&tp->napi);
        set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags);
+       rtl_unlock_work(tp);
 
        rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 }