]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/pci-quirks.c
Pull pnpacpi into release branch
[linux-2.6-omap-h63xx.git] / drivers / usb / host / pci-quirks.c
index e9e5bc178cef2e9a71eb2e70e96ced328ec7d00d..1045f846fbe2c4cedb5d3ac498488b572246258a 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/acpi.h>
+#include "pci-quirks.h"
 
 
 #define UHCI_USBLEGSUP         0xc0            /* legacy support */
@@ -191,8 +192,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
                }
                if (wait_time <= 0)
                        printk(KERN_WARNING "%s %s: BIOS handoff "
-                                       "failed (BIOS bug ?)\n",
-                                       pdev->dev.bus_id, "OHCI");
+                                       "failed (BIOS bug ?) %08x\n",
+                                       pdev->dev.bus_id, "OHCI",
+                                       readl(base + OHCI_CONTROL));
 
                /* reset controller, preserving RWC */
                writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
@@ -243,6 +245,12 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
                                pr_debug("%s %s: BIOS handoff\n",
                                                pdev->dev.bus_id, "EHCI");
 
+#if 0
+/* aleksey_gorelov@phoenix.com reports that some systems need SMI forced on,
+ * but that seems dubious in general (the BIOS left it off intentionally)
+ * and is known to prevent some systems from booting.  so we won't do this
+ * unless maybe we can determine when we're on a system that needs SMI forced.
+ */
                                /* BIOS workaround (?): be sure the
                                 * pre-Linux code receives the SMI
                                 */
@@ -252,12 +260,14 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
                                pci_write_config_dword(pdev,
                                                offset + EHCI_USBLEGCTLSTS,
                                                val | EHCI_USBLEGCTLSTS_SOOE);
-                       }
+#endif
 
-                       /* always say Linux will own the hardware
-                        * by setting EHCI_USBLEGSUP_OS.
-                        */
-                       pci_write_config_byte(pdev, offset + 3, 1);
+                               /* some systems get upset if this semaphore is
+                                * set for any other reason than forcing a BIOS
+                                * handoff..
+                                */
+                               pci_write_config_byte(pdev, offset + 3, 1);
+                       }
 
                        /* if boot firmware now owns EHCI, spin till
                         * it hands it over.
@@ -274,8 +284,8 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
                                 * it down, and hope nothing goes too wrong
                                 */
                                printk(KERN_WARNING "%s %s: BIOS handoff "
-                                               "failed (BIOS bug ?)\n",
-                                       pdev->dev.bus_id, "EHCI");
+                                               "failed (BIOS bug ?) %08x\n",
+                                       pdev->dev.bus_id, "EHCI", cap);
                                pci_write_config_byte(pdev, offset + 2, 0);
                        }