mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-pci@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com,
	Samyon Furman <samyon.furman@broadcom.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
Date: Tue,  1 Dec 2026 12:48:44 -0800	[thread overview]
Message-ID: <20261201204844.477863-1-florian.fainelli@broadcom.com> (raw)

From: Samyon Furman <samyon.furman@broadcom.com>

Treat the downstream ports of the PLX PEX 8616 and PEX 8617 switches as
hotplug bridges so that the PCI core reserves resources for devices
hot-added behind them, the same way quirk_hotplug_bridge() does for the
HINT HB6 bridge.

Only downstream ports are flagged. The size of the reservation is left to
the existing pci=hpmemsize=, pci=hpmmiosize= and pci=hpiosize= command
line options rather than being hard-coded in the quirk.

Signed-off-by: Samyon Furman <samyon.furman@broadcom.com>
[florian: Commit message, avoid hard coding hpmmiosize]
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/pci/quirks.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 3d568e217c15..e4b04299b01a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3285,6 +3285,19 @@ static void quirk_hotplug_bridge(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge);
 
+/*
+ * Treat the PLX PEX 8616/8617 downstream ports as hotplug bridges so that
+ * resources are reserved for devices hot-added behind them. The size of the
+ * reservation can be set with pci=hpmemsize=nnM and pci=hpiosize=nn.
+ */
+static void quirk_plx_hotplug_downstream(struct pci_dev *dev)
+{
+	if (pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM)
+		quirk_hotplug_bridge(dev);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8616, quirk_plx_hotplug_downstream);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8617, quirk_plx_hotplug_downstream);
+
 /*
  * This is a quirk for the Ricoh MMC controller found as a part of some
  * multifunction chips.
-- 
2.34.1


                 reply	other threads:[~2026-12-01 20:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261201204844.477863-1-florian.fainelli@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=samyon.furman@broadcom.com \
    /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

all inboxes | Powered by JetHome®