@@ -263,9 +263,9 @@ static int get_port_device_capability(struct pci_dev *dev)
if (dev->is_hotplug_bridge &&
(pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
- pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM) &&
- (pcie_ports_native || host->native_pcie_hotplug)) {
- services |= PCIE_PORT_SERVICE_HP;
+ pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM)) {
+ if (pcie_ports_native || host->native_pcie_hotplug)
+ services |= PCIE_PORT_SERVICE_HP;
/*
* Disable hot-plug interrupts in case they have been enabled
Currently when 'pcie_ports_native' and host's 'native_pcie_hotplug' are both false, kernel will not disable PCIe hotplug interrupts. But as those could be affected by software setup like kernel cmdline parameter, remove the depency over them. Suggested-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Feng Tang <feng.tang@linux.alibaba.com> --- drivers/pci/pcie/portdrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)