Re: [PATCH v2 0/5] PCI: Clean up and fix is_hotplug_bridge usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 13, 2025 at 04:31:00PM +0200, Lukas Wunner wrote:
> The original impetus of this series is to fix a runtime PM ref imbalance
> on hot-removal of PCIe hotplug ports (patch [1/5]).
> 
> That is achieved by adding an is_pciehp flag to struct pci_dev.
> The new flag is only set on PCIe Hot-Plug Capable ports, unlike the
> existing is_hotplug_bridge flag, which is also set on ACPI slots and
> Conventional PCI hotplug bridges (via quirk_hotplug_bridge()).
> 
> Patches [2/5] to [4/5] replace is_hotplug_bridge with is_pciehp in a
> number of places for clarity and to fix some actual bugs.
> 
> Optional patch [5/5] follows a suggestion from Bjorn to set
> host->native_pcie_hotplug up front based on pcie_ports_native.
> That patch needs an ack from Rafael because it touches ACPI code.
> Up to Bjorn whether it is a worthwhile improvement or not.
> 
> I'm open to suggestions for a different name than is_pciehp,
> e.g. is_pciehp_bridge.
> 
> I've reviewed this a couple of times, but would appreciate further
> reviewing and testing by others to raise the confidence.  Mika is
> out of office until July 28, so I'm cc'ing thunderbolt developers
> Alan, Gil and Rene.
> 
> I've got an additional patch to replace is_hotplug_bridge with is_pciehp
> in quirk_thunderbolt_hotplug_msi() and tb_apple_add_links().  I intend
> to submit it to Mika separately if/when this series is accepted.
> 
> Link to v1, which consisted only of a (problematic) variant of patch [1/5]:
> https://lore.kernel.org/r/86c3bd52bda4552d63ffb48f8a30343167e85271.1750698221.git.lukas@xxxxxxxxx/
> 
> Lukas Wunner (5):
>   PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports
>   PCI/portdrv: Use is_pciehp instead of is_hotplug_bridge
>   PCI: pciehp: Use is_pciehp instead of is_hotplug_bridge
>   PCI: Move is_pciehp check out of pciehp_is_native()
>   PCI: Set native_pcie_hotplug up front based on pcie_ports_native
> 
>  drivers/acpi/pci_root.c          |  3 ++-
>  drivers/pci/hotplug/pciehp_hpc.c |  2 +-
>  drivers/pci/pci-acpi.c           | 10 +---------
>  drivers/pci/pci.c                | 18 +++++++++++++-----
>  drivers/pci/pcie/portdrv.c       |  4 ++--
>  drivers/pci/probe.c              |  2 +-
>  include/linux/pci.h              |  6 ++++++
>  include/linux/pci_hotplug.h      |  3 ++-
>  8 files changed, 28 insertions(+), 20 deletions(-)

Thanks!  I applied these to pci/hotplug, hoping to put them in v6.17.

I moved the previous pci/hotplug branch to pci/hotplug-pnv_php.




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux