Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 374a9140 authored by Rajat Jain's avatar Rajat Jain Committed by Bjorn Helgaas
Browse files

PCI: Allow hotplug service drivers to operate in polling mode



Today the PCIe port bus driver disables the Hot-plug service if the port
device does not have the capability to generate interrupts.  However, a
user must be able to use the "pciehp_poll_mode" parameter to use the pciehp
in polling method in such a case.  Today it is not possible.

This patch allows a hotplug service driver to decide whether or not it
would like to continue in the absence of interrupts.

Signed-off-by: default avatarRajat Jain <rajatxjain@gmail.com>
Signed-off-by: default avatarRajat Jain <rajatjain@juniper.net>
Signed-off-by: default avatarGuenter Roeck <groeck@juniper.net>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 476a357f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -379,10 +379,13 @@ int pcie_port_device_register(struct pci_dev *dev)
	/*
	 * Initialize service irqs. Don't use service devices that
	 * require interrupts if there is no way to generate them.
	 * However, some drivers may have a polling mode (e.g. pciehp_poll_mode)
	 * that can be used in the absence of irqs.  Allow them to determine
	 * if that is to be used.
	 */
	status = init_service_irqs(dev, irqs, capabilities);
	if (status) {
		capabilities &= PCIE_PORT_SERVICE_VC;
		capabilities &= PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_HP;
		if (!capabilities)
			goto error_disable;
	}