summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-15 20:49:21 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-15 20:49:21 (GMT)
commitd5b2e30bdc695a1735b3c970e1f9738e9ca3dbf0 (patch)
tree79e832eb50d3b416bdada4903b2a2e2fefcc2800 /drivers/pci/pci-driver.c
parent7c7fac30581b2fe2e0783d9b6f53ca333cc2296c (diff)
parent84a1caf1453c3d44050bd22db958af4a7f99315c (diff)
downloadlinux-fsl-qoriq-d5b2e30bdc695a1735b3c970e1f9738e9ca3dbf0.tar.xz
Merge tag 'v3.5-rc7' into regulator-drivers
Linux 3.5-rc7
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index bf0cee6..099f46c 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -748,6 +748,18 @@ static int pci_pm_suspend_noirq(struct device *dev)
pci_pm_set_unknown_state(pci_dev);
+ /*
+ * Some BIOSes from ASUS have a bug: If a USB EHCI host controller's
+ * PCI COMMAND register isn't 0, the BIOS assumes that the controller
+ * hasn't been quiesced and tries to turn it off. If the controller
+ * is already in D3, this can hang or cause memory corruption.
+ *
+ * Since the value of the COMMAND register doesn't matter once the
+ * device has been suspended, we can safely set it to 0 here.
+ */
+ if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI)
+ pci_write_config_word(pci_dev, PCI_COMMAND, 0);
+
return 0;
}