r8152: fix the runtime suspend issues
authorhayeswang <hayeswang@realtek.com>
Mon, 7 Sep 2015 03:57:44 +0000 (11:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Sep 2015 03:27:54 +0000 (20:27 -0700)
commit2dd49e0f16fb0e07c6fcc1322ebba310f5827072
tree900c4c812c1432bb2c847350420faa021cd0d2ac
parentd0942473e3ca4629a40bbf0c9fd74fc0c7ff2a79
r8152: fix the runtime suspend issues

Fix the runtime suspend issues result from the linking change.

Case 1:
a) link down occurs.
b) driver disable tx/rx.
c) autosuspend occurs.
d) hw linking up.
e) device suspends without enabling tx/rx.
f) couldn't wake up when receiving packets.

Case 2:
a) Nway results in linking down.
b) autosuspend occurs.
c) device suspends.
d) device may not wake up when linking up.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c