summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
authorAlex He <alex.he@amd.com>2012-03-30 10:21:38 +0800
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-04-11 08:31:06 -0700
commit95018a53f7653e791bba1f54c8d75d9cb700d1bd (patch)
tree943dcbd00aac0b5aa623dede2d77619cd83ca18a /drivers/usb/host/pci-quirks.c
parent3fc8206d3dca1550eb0a1f6e2a350881835954ba (diff)
downloadblackbird-op-linux-95018a53f7653e791bba1f54c8d75d9cb700d1bd.tar.gz
blackbird-op-linux-95018a53f7653e791bba1f54c8d75d9cb700d1bd.zip
xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI
Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable bits will be cleared to zero and flag bits 29:31 are also cleared to zero. Other bits should be presvered as Table 146. This patch should be backported to kernels as old as 2.6.31. Signed-off-by: Alex He <alex.he@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 11de5f1be981..32dada8c8b4f 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -825,9 +825,13 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
}
}
- /* Disable any BIOS SMIs */
- writel(XHCI_LEGACY_DISABLE_SMI,
- base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
+ val = readl(base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
+ /* Mask off (turn off) any enabled SMIs */
+ val &= XHCI_LEGACY_DISABLE_SMI;
+ /* Mask all SMI events bits, RW1C */
+ val |= XHCI_LEGACY_SMI_EVENTS;
+ /* Disable any BIOS SMIs and clear all SMI events*/
+ writel(val, base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
if (usb_is_intel_switchable_xhci(pdev))
usb_enable_xhci_ports(pdev);
OpenPOWER on IntegriCloud