]> Git Repo - linux.git/commit
r8152: fix lockup when runtime PM is enabled
authorPeter Wu <[email protected]>
Tue, 8 Dec 2015 11:17:42 +0000 (12:17 +0100)
committerDavid S. Miller <[email protected]>
Wed, 9 Dec 2015 03:48:01 +0000 (22:48 -0500)
commit90186af404ada5a47b875bf3c16d0b02bb023ea0
tree0f08ac63447211f81449237e0b9ffe78996045a8
parentf406ce4234149c302a7acb0be01c08de7b40bdb5
r8152: fix lockup when runtime PM is enabled

When an interface is brought up which was previously suspended (via
runtime PM), it would hang. This happens because napi_disable is called
before napi_enable.

Solve this by avoiding napi_enable in the resume during open function
(netif_running is true when open is called, IFF_UP is set after a
successful open; netif_running is false when close is called, but IFF_UP
is then still set).

While at it, remove WORK_ENABLE check from rtl8152_open (introduced with
the original change) because it cannot happen:

 - After this patch, runtime resume will not set it during rtl8152_open.
 - When link is up, rtl8152_open is not called.
 - When link is down during system/auto suspend/resume, it is not set.

Fixes: 41cec84cf285 ("r8152: don't enable napi before rx ready")
Link: https://lkml.kernel.org/r/20151205105912.GA1766@al
Signed-off-by: Peter Wu <[email protected]>
Acked-by: Hayes Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/usb/r8152.c
This page took 0.056916 seconds and 4 git commands to generate.