summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-06-23 16:10:53 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-06-23 16:10:53 -0400
commit2c5a903a40d6d95f897c08f40e50ce8b48263fa4 (patch)
tree600ab0801401095a5b281d9b2f06cd30d9c5ce0e
parent8d526ff69102f467233f30b04beca1b8e1815ba9 (diff)
downloadlongterm-queue-2.6.34-2c5a903a40d6d95f897c08f40e50ce8b48263fa4.tar.gz
USB: avoid regression with nvidia shutdown
Thanks to Alan Stern for pointing this out. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/OHCI-fix-regression-caused-by-nVidia-shutdown-workar.patch71
-rw-r--r--queue/series2
2 files changed, 73 insertions, 0 deletions
diff --git a/queue/OHCI-fix-regression-caused-by-nVidia-shutdown-workar.patch b/queue/OHCI-fix-regression-caused-by-nVidia-shutdown-workar.patch
new file mode 100644
index 0000000..ed74edd
--- /dev/null
+++ b/queue/OHCI-fix-regression-caused-by-nVidia-shutdown-workar.patch
@@ -0,0 +1,71 @@
+From 7314ce81fd8e3f64213b28d34894ea9210e6e966 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 16 May 2011 12:15:19 -0400
+Subject: [PATCH] OHCI: fix regression caused by nVidia shutdown workaround
+
+commit 2b7aaf503d56216b847c8265421d2a7d9b42df3e upstream.
+
+This patch (as1463) fixes a regression caused by commit
+3df7169e73fc1d71a39cffeacc969f6840cdf52b (OHCI: work around for nVidia
+shutdown problem).
+
+The original problem encountered by people using NVIDIA chipsets was
+that USB devices were not turning off when the system shut down. For
+example, the LED on an optical mouse would remain on, draining a
+laptop's battery. The problem was caused by a bug in the chipset; an
+OHCI controller in the Reset state would continue to drive a bus reset
+signal even after system shutdown. The workaround was to put the
+controllers into the Suspend state instead.
+
+It turns out that later NVIDIA chipsets do not suffer from this bug.
+Instead some have the opposite bug: If a system is shut down while an
+OHCI controller is in the Suspend state, USB devices remain powered!
+On other systems, shutting down with a Suspended controller causes the
+system to reboot immediately. Thus, working around the original bug
+on some machines exposes other bugs on other machines.
+
+The best solution seems to be to limit the workaround to OHCI
+controllers with a low-numbered PCI product ID. I don't know exactly
+at what point NVIDIA changed their chipsets; the value used here is a
+guess. So far it was worked out okay for all the people who have
+tested it.
+
+This fixes Bugzilla #35032.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Andre "Osku" Schmidt <andre.osku.schmidt@googlemail.com>
+Tested-by: Yury Siamashka <yurand2@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+---
+ drivers/usb/host/ohci-pci.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
+index 948a353..67f83e5 100644
+--- a/drivers/usb/host/ohci-pci.c
++++ b/drivers/usb/host/ohci-pci.c
+@@ -207,10 +207,18 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd)
+ */
+ static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
+ {
++ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+
+- ohci->flags |= OHCI_QUIRK_SHUTDOWN;
+- ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
++ /* Evidently nVidia fixed their later hardware; this is a guess at
++ * the changeover point.
++ */
++#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB 0x026d
++
++ if (pdev->device < PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB) {
++ ohci->flags |= OHCI_QUIRK_SHUTDOWN;
++ ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
++ }
+
+ return 0;
+ }
+--
+1.7.4.4
+
diff --git a/queue/series b/queue/series
index 1fedc55..2747450 100644
--- a/queue/series
+++ b/queue/series
@@ -95,6 +95,8 @@ mptfusion-mptctl_release-is-required-in-mptctl.c.patch
mptfusion-Fix-Incorrect-return-value-in-mptscsih_dev.patch
ocfs2_connection_find-returns-pointer-to-bad-structu.patch
OHCI-work-around-for-nVidia-shutdown-problem.patch
+# regression fix from stable mailing list
+OHCI-fix-regression-caused-by-nVidia-shutdown-workar.patch
x86-pvclock-Zero-last_value-on-resume.patch
CRED-Fix-get_task_cred-and-task_state-to-not-resurre.patch
CRED-Fix-kernel-panic-upon-security_file_alloc-failu.patch