aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-02-09 16:35:31 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-02-14 00:33:39 -0500
commita38408cd8d6bc0e5d16e609d4b1fdf9ba2e099ce (patch)
tree5a559a05117c481f0cefd3c67a1d01e744cf7946 /drivers/usb/host
parent75c0141ca2fdae7c332d8f17412fbe0939dd005f (diff)
[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: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/pci-quirks.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index e9e5bc178cef..118288d94423 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -191,8 +191,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
191 } 191 }
192 if (wait_time <= 0) 192 if (wait_time <= 0)
193 printk(KERN_WARNING "%s %s: BIOS handoff " 193 printk(KERN_WARNING "%s %s: BIOS handoff "
194 "failed (BIOS bug ?)\n", 194 "failed (BIOS bug ?) %08x\n",
195 pdev->dev.bus_id, "OHCI"); 195 pdev->dev.bus_id, "OHCI",
196 readl(base + OHCI_CONTROL));
196 197
197 /* reset controller, preserving RWC */ 198 /* reset controller, preserving RWC */
198 writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); 199 writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
@@ -243,6 +244,12 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
243 pr_debug("%s %s: BIOS handoff\n", 244 pr_debug("%s %s: BIOS handoff\n",
244 pdev->dev.bus_id, "EHCI"); 245 pdev->dev.bus_id, "EHCI");
245 246
247#if 0
248/* aleksey_gorelov@phoenix.com reports that some systems need SMI forced on,
249 * but that seems dubious in general (the BIOS left it off intentionally)
250 * and is known to prevent some systems from booting. so we won't do this
251 * unless maybe we can determine when we're on a system that needs SMI forced.
252 */
246 /* BIOS workaround (?): be sure the 253 /* BIOS workaround (?): be sure the
247 * pre-Linux code receives the SMI 254 * pre-Linux code receives the SMI
248 */ 255 */
@@ -252,6 +259,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
252 pci_write_config_dword(pdev, 259 pci_write_config_dword(pdev,
253 offset + EHCI_USBLEGCTLSTS, 260 offset + EHCI_USBLEGCTLSTS,
254 val | EHCI_USBLEGCTLSTS_SOOE); 261 val | EHCI_USBLEGCTLSTS_SOOE);
262#endif
255 } 263 }
256 264
257 /* always say Linux will own the hardware 265 /* always say Linux will own the hardware
@@ -274,8 +282,8 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
274 * it down, and hope nothing goes too wrong 282 * it down, and hope nothing goes too wrong
275 */ 283 */
276 printk(KERN_WARNING "%s %s: BIOS handoff " 284 printk(KERN_WARNING "%s %s: BIOS handoff "
277 "failed (BIOS bug ?)\n", 285 "failed (BIOS bug ?) %08x\n",
278 pdev->dev.bus_id, "EHCI"); 286 pdev->dev.bus_id, "EHCI", cap);
279 pci_write_config_byte(pdev, offset + 2, 0); 287 pci_write_config_byte(pdev, offset + 2, 0);
280 } 288 }
281 289