summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2026-04-13 12:50:05 -0500
committerBjorn Helgaas <bhelgaas@google.com>2026-04-13 12:50:05 -0500
commit12b56ec723d2d736feb16ea6ea2505520de3cc58 (patch)
tree99fe01111140e21070435cbc52af94d74696f673 /include/linux
parent85d9948d59efad0833139f11c3e07fa25c688b12 (diff)
parent702c1d56c7177a0481abd2814bab9495f1150967 (diff)
Merge branch 'pci/reset'
- Update slot handling so all ARI functions are treated as being in the same slot. They're all reset by Secondary Bus Reset, but previously drivers of ARI functions that appeared to be on a non-zero device weren't notified and fatal hardware errors could result (Keith Busch) - Make sysfs reset_subordinate hotplug safe to avoid spurious hotplug events (Keith Busch) - Consolidate bus iteration across the _lock(), _unlock(), and _trylock() functions for pci_bus and pci_slot (Ilpo Järvinen) - Hide Secondary Bus Reset ('bus') from sysfs reset_methods if masked by CXL because it has no effect (Vidya Sagar) * pci/reset: PCI/CXL: Hide SBR from reset_methods if masked by CXL PCI: Consolidate pci_bus/slot_lock/unlock/trylock() PCI: Make reset_subordinate hotplug safe PCI: Allow all bus devices to use the same slot PCI: Rename __pci_bus_reset() and __pci_slot_reset()
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 47c5b0c09ffb..cc98713e3ce8 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -72,12 +72,20 @@
/* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */
#define PCI_BUS_NUM(x) (((x) >> 8) & 0xff)
+/*
+ * PCI_SLOT_ALL_DEVICES indicates a slot that covers all devices on the bus.
+ * Used for PCIe hotplug where the physical slot is the entire secondary bus,
+ * and, if ARI Forwarding is enabled, functions may appear to be on multiple
+ * devices.
+ */
+#define PCI_SLOT_ALL_DEVICES 0xfe
+
/* pci_slot represents a physical slot */
struct pci_slot {
struct pci_bus *bus; /* Bus this slot is on */
struct list_head list; /* Node in list of slots */
struct hotplug_slot *hotplug; /* Hotplug info (move here) */
- unsigned char number; /* PCI_SLOT(pci_dev->devfn) */
+ unsigned char number; /* Device nr, or PCI_SLOT_ALL_DEVICES */
struct kobject kobj;
};