Patch 2.6.32.28 to 2.6.32.32
/drivers/usb/host/pci-quirks.c
blob:464ed977b45d9d0388af38e565fb0fe07966c712 -> blob:83b5f9cea85ac9f43af8d3b1eb87a259517cc05c
--- drivers/usb/host/pci-quirks.c
+++ drivers/usb/host/pci-quirks.c
@@ -169,7 +169,6 @@ static int __devinit mmio_resource_enabl
static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
{
void __iomem *base;
- u32 control;
if (!mmio_resource_enabled(pdev, 0))
return;
@@ -178,14 +177,10 @@ static void __devinit quirk_usb_handoff_
if (base == NULL)
return;
- control = readl(base + OHCI_CONTROL);
-
/* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
-#ifdef __hppa__
-#define OHCI_CTRL_MASK (OHCI_CTRL_RWC | OHCI_CTRL_IR)
-#else
-#define OHCI_CTRL_MASK OHCI_CTRL_RWC
-
+#ifndef __hppa__
+{
+ u32 control = readl(base + OHCI_CONTROL);
if (control & OHCI_CTRL_IR) {
int wait_time = 500; /* arbitrary; 5 seconds */
writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
@@ -199,12 +194,13 @@ static void __devinit quirk_usb_handoff_
dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
" (BIOS bug?) %08x\n",
readl(base + OHCI_CONTROL));
+
+ /* reset controller, preserving RWC */
+ writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
}
+}
#endif
- /* reset controller, preserving RWC (and possibly IR) */
- writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
-
/*
* disable interrupts
*/