]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Make reset_subordinate hotplug safe
authorKeith Busch <kbusch@kernel.org>
Tue, 17 Feb 2026 16:08:36 +0000 (08:08 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 9 Mar 2026 20:40:28 +0000 (15:40 -0500)
commit8238cb69c01fe4dbb4e3be277fff3ed680ac0108
tree884f70e86df5d4df19168d6548d627380c4cea34
parent102c8b26b54e363f85c4c86099ca049a0a76bb58
PCI: Make reset_subordinate hotplug safe

Use the slot reset method when resetting the bridge if the bus contains
hot plug slots. This fixes spurious hot plug events that are triggered
by the secondary bus reset that bypasses the slot's detection disabling.

Resetting a bridge's subordinate bus can be done like this:

  # echo 1 > /sys/bus/pci/devices/0000:50:01.0/reset_subordinate

Prior to this patch, an example kernel message may show something like:

  pcieport 0000:50:01.0: pciehp: Slot(40): Link Down

With this change, the pciehp driver ignores the link event during the
reset, so may show this message instead:

  pcieport 0000:50:01.0: pciehp: Slot(40): Link Down/Up ignored

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260217160836.2709885-4-kbusch@meta.com
drivers/pci/pci-sysfs.c
drivers/pci/pci.c
drivers/pci/pci.h