r8169: runtime resume before shutdown.
authorfrançois romieu <romieu@fr.zoreil.com>
Tue, 6 Mar 2012 01:14:12 +0000 (01:14 +0000)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:01 +0000 (19:15 +0100)
commite986d145bdeac218d38830efdde741a90541b7e7
tree733372274add7e5a113eee136c2ab9b688ee9d03
parentfdd1fb3485dfec00eb20baab3cf3b600e87fe071
r8169: runtime resume before shutdown.

BugLink: http://bugs.launchpad.net/bugs/981162

commit 2a15cd2ff488a9fdb55e5e34060f499853b27c77 upstream.

With runtime PM, if the ethernet cable is disconnected, the device is
transitioned to D3 state to conserve energy. If the system is shutdown
in this state, any register accesses in rtl_shutdown are dropped on
the floor. As the device was programmed by .runtime_suspend() to wake
on link changes, it is thus brought back up as soon as the link recovers.

Resuming every suspended device through the driver core would slow things
down and it is not clear how many devices really need it now.

Original report and D0 transition patch by Sameer Nanda. Patch has been
changed to comply with advices by Rafael J. Wysocki and the PM folks.

Reported-by: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Hayes Wang <hayeswang@realtek.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/realtek/r8169.c