linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jayachandran C <jchandra@broadcom.com>
To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Cc: Jayachandran C <jchandra@broadcom.com>
Subject: [RFC PATCH 2/2] PCI: Quirks for Broadcom Vulcan
Date: Mon, 15 Feb 2016 03:35:01 +0530	[thread overview]
Message-ID: <1455487501-28630-2-git-send-email-jchandra@broadcom.com> (raw)
In-Reply-To: <1455487501-28630-1-git-send-email-jchandra@broadcom.com>

Handle 2 quirks of the Broadcom Vulcan PCI controller:
 - Make internal bridges to be skipped during DMA alias search
 - Skip BAR0 resource assignment internal bridges. The BARs of
   bridges cannot be assigned from the mem resource range.
---
 drivers/pci/quirks.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0575a1e..afc186a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3705,6 +3705,27 @@ DECLARE_PCI_FIXUP_HEADER(0x1283, 0x8892, quirk_use_pcie_bridge_dma_alias);
 DECLARE_PCI_FIXUP_HEADER(0x8086, 0x244e, quirk_use_pcie_bridge_dma_alias);
 
 /*
+ * Two levels of bridges in Broadcom Vulcan are not real PCI or PCIe bridges.
+ * These are internal bridges and should not be used for dma alias
+ * calculations. Additionally, the BAR0 of thes bridges should not be
+ * assigned with a mem resource from linux
+ */
+static void quirk_bridge_brcm_vulcan_internal(struct pci_dev *pdev)
+{
+	struct resource *r = &pdev->resource[0];
+
+	/* skip from alias search */
+	pdev->dev_flags |= PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS;
+
+	/* clear BAR0, should not be used from Linux */
+	memset(r, 0, sizeof(*r));
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
+				quirk_bridge_brcm_vulcan_internal);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9039,
+				quirk_bridge_brcm_vulcan_internal);
+
+/*
  * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
  * class code.  Fix it.
  */
-- 
1.9.1


  reply	other threads:[~2016-02-14 22:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14 22:05 [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS Jayachandran C
2016-02-14 22:05 ` Jayachandran C [this message]
2016-02-15  9:26   ` [RFC PATCH 2/2] PCI: Handle Broadcom Vulcan quirks Jayachandran C
2016-02-15 18:30     ` Bjorn Helgaas
2016-02-16 16:17       ` Jayachandran Chandrashekaran Nair
2016-02-16 17:14         ` Bjorn Helgaas
2016-02-16 18:09           ` Jayachandran Chandrashekaran Nair
2016-02-16 21:03             ` Bjorn Helgaas
2016-02-16 21:46               ` Arnd Bergmann
2016-02-17 17:06               ` Jayachandran Chandrashekaran Nair
2016-02-18 15:49                 ` Bjorn Helgaas
2016-02-23 14:40                   ` Jayachandran Chandrashekaran Nair
2016-02-23 15:12                     ` Bjorn Helgaas
2016-02-27  8:14                       ` Jayachandran Chandrashekaran Nair
2016-02-27 14:36                         ` Bjorn Helgaas
2016-02-15 18:20 ` [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS Bjorn Helgaas
2016-02-15 19:39   ` Alex Williamson
2016-02-16 21:08     ` Jayachandran Chandrashekaran Nair
2016-02-16 22:25       ` Alex Williamson
2016-02-17 11:45         ` Jayachandran Chandrashekaran Nair
2016-02-17 15:28           ` Alex Williamson
2016-02-18 13:27             ` Jayachandran Chandrashekaran Nair
2016-02-18 14:14               ` Alex Williamson
2016-02-20 18:15                 ` Jayachandran Chandrashekaran Nair

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455487501-28630-2-git-send-email-jchandra@broadcom.com \
    --to=jchandra@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).