diff options
author | Rajat Jain <rajatxjain@gmail.com> | 2014-03-31 19:51:23 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-24 18:47:46 -0400 |
commit | 374a91404314cef882b27b293dd34d89e2a3c0b6 (patch) | |
tree | 0cb20186a319974c787d5271abec960b3dcb8e62 /drivers/pci/pcie | |
parent | 476a357fd9045a4c91faa055fadabf550aedb8c5 (diff) |
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: Rajat Jain <rajatxjain@gmail.com>
Signed-off-by: Rajat Jain <rajatjain@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 986f8eadfd39..f6503add2f35 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -379,10 +379,13 @@ int pcie_port_device_register(struct pci_dev *dev) | |||
379 | /* | 379 | /* |
380 | * Initialize service irqs. Don't use service devices that | 380 | * Initialize service irqs. Don't use service devices that |
381 | * require interrupts if there is no way to generate them. | 381 | * require interrupts if there is no way to generate them. |
382 | * However, some drivers may have a polling mode (e.g. pciehp_poll_mode) | ||
383 | * that can be used in the absence of irqs. Allow them to determine | ||
384 | * if that is to be used. | ||
382 | */ | 385 | */ |
383 | status = init_service_irqs(dev, irqs, capabilities); | 386 | status = init_service_irqs(dev, irqs, capabilities); |
384 | if (status) { | 387 | if (status) { |
385 | capabilities &= PCIE_PORT_SERVICE_VC; | 388 | capabilities &= PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_HP; |
386 | if (!capabilities) | 389 | if (!capabilities) |
387 | goto error_disable; | 390 | goto error_disable; |
388 | } | 391 | } |