Commit a38408cd authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: fix up the usb early handoff logic for EHCI

Disable some dubious "early" USB handoff code that allegedly works around bugs
on some systems (we don't know which ones) but rudely breaks some others.

Also make the kernel warnings reporting BIOS handoff problems be more useful,
reporting the register whose value displays the trouble.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 75c0141c
...@@ -191,8 +191,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) ...@@ -191,8 +191,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
} }
if (wait_time <= 0) if (wait_time <= 0)
printk(KERN_WARNING "%s %s: BIOS handoff " printk(KERN_WARNING "%s %s: BIOS handoff "
"failed (BIOS bug ?)\n", "failed (BIOS bug ?) %08x\n",
pdev->dev.bus_id, "OHCI"); pdev->dev.bus_id, "OHCI",
readl(base + OHCI_CONTROL));
/* reset controller, preserving RWC */ /* reset controller, preserving RWC */
writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
...@@ -243,6 +244,12 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) ...@@ -243,6 +244,12 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
pr_debug("%s %s: BIOS handoff\n", pr_debug("%s %s: BIOS handoff\n",
pdev->dev.bus_id, "EHCI"); 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 /* BIOS workaround (?): be sure the
* pre-Linux code receives the SMI * pre-Linux code receives the SMI
*/ */
...@@ -252,6 +259,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) ...@@ -252,6 +259,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
pci_write_config_dword(pdev, pci_write_config_dword(pdev,
offset + EHCI_USBLEGCTLSTS, offset + EHCI_USBLEGCTLSTS,
val | EHCI_USBLEGCTLSTS_SOOE); val | EHCI_USBLEGCTLSTS_SOOE);
#endif
} }
/* always say Linux will own the hardware /* always say Linux will own the hardware
...@@ -274,8 +282,8 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) ...@@ -274,8 +282,8 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
* it down, and hope nothing goes too wrong * it down, and hope nothing goes too wrong
*/ */
printk(KERN_WARNING "%s %s: BIOS handoff " printk(KERN_WARNING "%s %s: BIOS handoff "
"failed (BIOS bug ?)\n", "failed (BIOS bug ?) %08x\n",
pdev->dev.bus_id, "EHCI"); pdev->dev.bus_id, "EHCI", cap);
pci_write_config_byte(pdev, offset + 2, 0); pci_write_config_byte(pdev, offset + 2, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment