[PATCH V4 06/29] PCI: Add a call to pci_assign_irq in do_pci_enable_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The pci_assign_irq function allows assignment of an irq to devices
during device enable time rather than only at boot. Therefore call it
in the do_pci_enable_device function during the enable device
code path so this assignment can be performed.

This patch will do nothing on arches which do not set the irq mapping
function pointers and is therefore currently a noop, however as support
for these function pointers is added to arch specific code this will
cause irq asignment to migrate to device enable time allowing the new
codepaths to be used.

Signed-off-by: Matthew Minter <matt@xxxxxxxxxxxx>
---
 drivers/pci/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6a9a111..6907312 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1226,6 +1226,8 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
 	if (err < 0 && err != -EIO)
 		return err;
 
+	pci_assign_irq(dev);
+
 	bridge = pci_upstream_bridge(dev);
 	if (bridge)
 		pcie_aspm_powersave_config_link(bridge);
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux