* [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
@ 2026-12-01 20:48 Florian Fainelli
2026-12-01 20:56 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2026-12-01 20:48 UTC (permalink / raw)
To: linux-pci
Cc: bcm-kernel-feedback-list, Samyon Furman, Florian Fainelli,
Bjorn Helgaas, open list
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
2026-12-01 20:48 [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617 Florian Fainelli
@ 2026-12-01 20:56 ` sashiko-bot
2026-12-01 21:28 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-12-01 20:56 UTC (permalink / raw)
To: Florian Fainelli, linux-pci
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] PCI: quirk_plx_hotplug_downstream() forces hotplug on all PEX
8616/8617 ports
--
commit 612fc82a4bcb6bed7fd13ad74e78819a0bf1c86c
Author: Samyon Furman <samyon.furman@broadcom.com>
PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
This commit adds a header fixup that marks downstream ports of PLX PEX 8616
and PEX 8617 PCIe switches as hotplug bridges.
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index fff85df3c301c..c1ca094d6d6cf 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3307,6 +3307,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);
[Severity: Medium]
Should quirk_plx_hotplug_downstream() really force is_hotplug_bridge = 1 on
every downstream port of every PLX PEX 8616 and PEX 8617 switch?
Unlike the HINT HB6 conventional PCI-to-PCI bridge, the PEX 8616 and 8617
are general-purpose PCIe switches where hotplug capability is a per-port
board property normally advertised via PCI_EXP_SLTCAP_HPC (configured in
switch EEPROM, strapping or firmware) and detected by
set_pcie_hotplug_bridge().
Even when no pci=hp* command-line options are passed, marking every
downstream port with is_hotplug_bridge = 1 causes __pci_bus_size_bridges()
to reserve the default hotplug I/O (256B, rounded to a 4KB window), MMIO
(2MB) and prefetchable MMIO (2MB) windows on all ports, including unused
ports and ports wired to fixed endpoints. Because is_pciehp remains 0,
pci_bridge_d3_possible() also disables D3 power management on all PEX
8616/8617 downstream ports across all platforms.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201204844.477863-1-florian.fainelli@broadcom.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
2026-12-01 20:56 ` sashiko-bot
@ 2026-12-01 21:28 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2026-12-01 21:28 UTC (permalink / raw)
To: sashiko-reviews, linux-pci
On 12/1/26 12:56, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] PCI: quirk_plx_hotplug_downstream() forces hotplug on all PEX
> 8616/8617 ports
> --
>
> commit 612fc82a4bcb6bed7fd13ad74e78819a0bf1c86c
> Author: Samyon Furman <samyon.furman@broadcom.com>
>
> PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
>
> This commit adds a header fixup that marks downstream ports of PLX PEX 8616
> and PEX 8617 PCIe switches as hotplug bridges.
>
>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>> index fff85df3c301c..c1ca094d6d6cf 100644
>> --- a/drivers/pci/quirks.c
>> +++ b/drivers/pci/quirks.c
>> @@ -3307,6 +3307,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);
>
> [Severity: Medium]
> Should quirk_plx_hotplug_downstream() really force is_hotplug_bridge = 1 on
> every downstream port of every PLX PEX 8616 and PEX 8617 switch?
>
> Unlike the HINT HB6 conventional PCI-to-PCI bridge, the PEX 8616 and 8617
> are general-purpose PCIe switches where hotplug capability is a per-port
> board property normally advertised via PCI_EXP_SLTCAP_HPC (configured in
> switch EEPROM, strapping or firmware) and detected by
> set_pcie_hotplug_bridge().
>
> Even when no pci=hp* command-line options are passed, marking every
> downstream port with is_hotplug_bridge = 1 causes __pci_bus_size_bridges()
> to reserve the default hotplug I/O (256B, rounded to a 4KB window), MMIO
> (2MB) and prefetchable MMIO (2MB) windows on all ports, including unused
> ports and ports wired to fixed endpoints. Because is_pciehp remains 0,
> pci_bridge_d3_possible() also disables D3 power management on all PEX
> 8616/8617 downstream ports across all platforms.
>
I simplified the patch a tad too much, let me go back to the original
bug ticket items to ensure what is submitted matches what the issue was.
pw-bot: cr
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 21:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 20:48 [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617 Florian Fainelli
2026-12-01 20:56 ` sashiko-bot
2026-12-01 21:28 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox