]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: PCI: Disable broken RTIT_BAR of Intel TH
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 15 Sep 2017 12:44:42 +0000 (15:44 +0300)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:44:59 +0000 (07:44 -0600)
BugLink: http://bugs.launchpad.net/bugs/1715833
On some intergrations of the Intel TH the reported size of RTIT_BAR
doesn't match its actual size, which leads to overlaps with other
devices' resources.

For this reason, we need to disable the RTIT_BAR on Denverton where
it would overlap with XHCI MMIO space and effectively kill usb dead.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/pci/quirks.c

index c5cab5269a1ac358a071cadf2b9da57d331bfbc2..db82bef43b99d29183959dca7711b538f322dddb 100644 (file)
@@ -4807,6 +4807,27 @@ static void quirk_intel_no_flr(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_no_flr);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_no_flr);
 
+static void quirk_intel_th_rtit_bar(struct pci_dev *dev)
+{
+       struct resource *r = &dev->resource[4];
+
+       /*
+        * Hello, Denverton!
+        * Denverton reports 2k of RTIT_BAR (resource 4), which can't be
+        * right given the 16 threads. When Intel TH gets enabled, the
+        * actual resource overlaps the XHCI MMIO space and causes it
+        * to die.
+        * We're not really using RTIT_BAR at all at the moment, so it's
+        * a safe choice to disable this resource.
+        */
+       if (r->end == r->start + 0x7ff) {
+               r->flags = 0;
+               r->start = 0;
+               r->end   = 0;
+       }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x19e1, quirk_intel_th_rtit_bar);
+
 static void quirk_no_ext_tags(struct pci_dev *pdev)
 {
        struct pci_host_bridge *bridge = pci_find_host_bridge(pdev->bus);