public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] PCI: fix system hang issue of Marvell SATA host controller
@ 2013-03-07 14:29 yxlraid
  2013-03-07 16:28 ` Bjorn Helgaas
  0 siblings, 1 reply; 17+ messages in thread
From: yxlraid @ 2013-03-07 14:29 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.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


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-03-21 16:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 14:29 [PATCH 2/2] PCI: fix system hang issue of Marvell SATA host controller yxlraid
2013-03-07 16:28 ` Bjorn Helgaas
2013-03-08  3:07   ` Xiangliang Yu
2013-03-08  4:19     ` Bjorn Helgaas
2013-03-08  6:51       ` Xiangliang Yu
2013-03-08 17:01         ` Bjorn Helgaas
2013-03-09 14:49           ` Xiangliang Yu
2013-03-09 23:24             ` Myron Stowe
     [not found]               ` <F766E4F80769BD478052FB6533FA745D25F440A64D@SC-VEXCH4.marvell.com>
2013-03-11 21:19                 ` Myron Stowe
     [not found]                   ` <F766E4F80769BD478052FB6533FA745D25F440A9C6@SC-VEXCH4.marvell.com>
2013-03-12 16:21                     ` Bjorn Helgaas
2013-03-13  9:40                       ` Xiangliang Yu
2013-03-14 15:03                         ` Myron Stowe
2013-03-17  0:13                           ` Myron Stowe
2013-03-21 16:00                             ` Myron Stowe
2013-03-09  3:18         ` Myron Stowe
2013-03-14  4:16           ` Robert Hancock
2013-03-14 15:02             ` Myron Stowe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox