]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: (no-up) PCI: fix system hang issue of Marvell SATA host controller
authorXiangliang Yu <yuxiangl@marvell.com>
Thu, 7 Mar 2013 14:29:16 +0000 (14:29 +0000)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
BugLink: http://bugs.launchpad.net/bugs/1159863
Hassle someone if this patch hasn't been removed by 13.10.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1159863/comments/2

Fix system hang issue: if first accessed resource file of BAR0 ~
BAR4, system will hang after executing lspci command

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/pci/quirks.c

index 1800befa8b8baa1ca87052b7a4dc4e36cde9b2d8..1a13bdb1a915f045d2bc98812a69be24df47c6ce 100644 (file)
@@ -41,6 +41,21 @@ static void quirk_mmio_always_on(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
                                PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
 
+/* The BAR0 ~ BAR4 of Marvell 9125 device can't be accessed
+*  by IO resource file, and need to skip the files
+*/
+static void quirk_marvell_mask_bar(struct pci_dev *dev)
+{
+       int i;
+
+       for (i = 0; i < 5; i++)
+               if (dev->resource[i].start)
+                       dev->resource[i].start =
+                               dev->resource[i].end = 0;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9125,
+                               quirk_marvell_mask_bar);
+
 /* The Mellanox Tavor device gives false positive parity errors
  * Mark this device with a broken_parity_status, to allow
  * PCI scanning code to "skip" this now blacklisted device.