Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Florian Fainelli" <florian.fainelli@broadcom.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Add hotplug bridge quirk for PLX PEX 8616/8617
Date: Tue, 01 Dec 2026 20:56:02 +0000	[thread overview]
Message-ID: <sashiko-outbox-244257@kernel.org> (raw)
In-Reply-To: <20261201204844.477863-1-florian.fainelli@broadcom.com>

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

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-12-01 21:28   ` Florian Fainelli

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=sashiko-outbox-244257@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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