]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Apr 2012 00:33:30 +0000 (17:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Apr 2012 00:33:30 +0000 (17:33 -0700)
added patches:
r8169-runtime-resume-before-shutdown.patch

queue-3.2/r8169-runtime-resume-before-shutdown.patch [new file with mode: 0644]
queue-3.2/series

diff --git a/queue-3.2/r8169-runtime-resume-before-shutdown.patch b/queue-3.2/r8169-runtime-resume-before-shutdown.patch
new file mode 100644 (file)
index 0000000..54045a1
--- /dev/null
@@ -0,0 +1,55 @@
+From 2a15cd2ff488a9fdb55e5e34060f499853b27c77 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
+Date: Tue, 6 Mar 2012 01:14:12 +0000
+Subject: r8169: runtime resume before shutdown.
+
+From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
+
+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>
+
+---
+ drivers/net/ethernet/realtek/r8169.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/ethernet/realtek/r8169.c
++++ b/drivers/net/ethernet/realtek/r8169.c
+@@ -6194,6 +6194,9 @@ static void rtl_shutdown(struct pci_dev
+ {
+       struct net_device *dev = pci_get_drvdata(pdev);
+       struct rtl8169_private *tp = netdev_priv(dev);
++      struct device *d = &pdev->dev;
++
++      pm_runtime_get_sync(d);
+       rtl8169_net_suspend(dev);
+@@ -6215,6 +6218,8 @@ static void rtl_shutdown(struct pci_dev
+               pci_wake_from_d3(pdev, true);
+               pci_set_power_state(pdev, PCI_D3hot);
+       }
++
++      pm_runtime_put_noidle(d);
+ }
+ static struct pci_driver rtl8169_pci_driver = {
index 713d654ba38ee04d452681cf8536e8ec510f1d3e..8e50a17ff27a616bead950f63b7c079ecc1379af 100644 (file)
@@ -28,3 +28,4 @@ drm-i915-no-lvds-quirk-on-msi-dc500.patch
 drm-i915-sanitize-bios-debugging-bits-from-pipeconf.patch
 drm-i915-add-lock-on-drm_helper_resume_force_mode.patch
 drm-i915-quirk-away-broken-opregion-vbt.patch
+r8169-runtime-resume-before-shutdown.patch