pci: Allow hotplug service drivers to operate in polling mode
PATCH v2 1/1 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 absense of interrupts.
---
v2: Drop the extra debug msg in pciehp
(and just retain the changes in portdrv_core.c)
drivers/pci/pcie/portdrv_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/pcie/portdrv_core.c +4 -1
@@ -377,10 +377,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 absense 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; }
Signature · 1 line
1.7.9.5
Hello Bjorn,
Just wondering if you got a chance to look at this one. This independent of my other patch (that makes polling, a per-port thing).
Without this patch - today the hot-plug service cannot be used at all in polling mode IF the interrupts are broken (which I'd assume is the case when one would want to resort to use polling).
Thanks,
Rajat
Quoted 56 lines
-----Original Message-----
From: [email protected] [mailto:linux-pci- [email protected]] On Behalf Of Rajat Jain
Sent: Monday, March 31, 2014 4:51 PM
To: Bjorn Helgaas; [email protected]; [email protected]
Cc: Rajat Jain; Guenter Roeck
Subject: [PATCH v2] pci: Allow hotplug service drivers to operate in polling modeToday 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 absense of interrupts.
Signed-off-by Rajat Jain <[email protected]>Signed-off-by Rajat Jain <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
v2: Drop the extra debug msg in pciehp
(and just retain the changes inportdrv_core.c)drivers/pci/pcie/portdrv_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv_core.c +4
-1@@ -377,10 +377,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 absense 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)drivers/pci/pcie/portdrv_core.c +0
-1goto error_disable; } --1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Rajat Jain
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.
Quoted 6 lines
This patch allows a hotplug service driver to decide whether or not it would like to continue in absense of interrupts.
Signed-off-by Rajat Jain <[email protected]>Signed-off-by Rajat Jain <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Applied to pci/hotplug for v3.16, thanks!
Quoted 29 lines
---
v2: Drop the extra debug msg in pciehp
(and just retain the changes inportdrv_core.c)drivers/pci/pcie/portdrv_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv_core.c +4
-1@@ -377,10 +377,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 absense 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; }Signature · 1 line
1.7.9.5