Skip to content

Commit c6036c3

Browse files
l1kbjorn-helgaas
authored andcommitted
PCI: pciehp: Use is_pciehp instead of is_hotplug_bridge
The PCIe hotplug driver calculates the depth of a nested hotplug port by looking at the is_hotplug_bridge flag. The depth is used as lockdep class to tell hotplug ports apart. The is_hotplug_bridge flag encompasses ACPI slots handled by the ACPI hotplug driver, hence the calculated depth may be too high. Avoid by checking the is_pciehp flag instead. This glitch likely has no user-visible impact: ACPI slots typically only exist at the Root Port level, not in nested hotplug hierarchies. Also, CONFIG_LOCKDEP is usually only used by developers. So this is just for the sake of correctness. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/59a097376a2bb493da9efd66fb196ae4b66f8a09.1752390102.git.lukas@wunner.de
1 parent 1d60796 commit c6036c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/hotplug/pciehp_hpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ static inline int pcie_hotplug_depth(struct pci_dev *dev)
995995

996996
while (bus->parent) {
997997
bus = bus->parent;
998-
if (bus->self && bus->self->is_hotplug_bridge)
998+
if (bus->self && bus->self->is_pciehp)
999999
depth++;
10001000
}
10011001

0 commit comments

Comments
 (0)