[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362666556-10036-1-git-send-email-yxlraid@gmail.com>
Date: Thu, 7 Mar 2013 22:29:16 +0800
From: yxlraid@...il.com
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Xiangliang Yu <yuxiangl@...vell.com>
Subject: [PATCH 2/2] PCI: fix system hang issue of Marvell SATA host controller
From: Xiangliang Yu <yuxiangl@...vell.com>
Fix system hang issue: if first accessed resource file of BAR0 ~
BAR4, system will hang after executing lspci command
---
drivers/pci/quirks.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0369fb6..d49f8dc 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -44,6 +44,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.
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists