diff options
author | Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> | 2016-09-01 13:14:43 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-13 18:39:21 +0300 |
commit | 8a4036edf9463b6cf8c2537727b4511c4411d198 (patch) | |
tree | abab1f4016b1267d0a5a6088bc127609a6fe9627 /drivers/pci/host/pcie-xilinx.c | |
parent | 3cd049ab9edd48a41955b8d05f0bc57ead918456 (diff) | |
download | linux-8a4036edf9463b6cf8c2537727b4511c4411d198.tar.xz |
PCI: xilinx: Clear correct MSI set bit
Kernel provides virtual IRQ number at teardown. Get hwirq number from
virtual IRQ and clear correct MSI set bit.
Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/pci/host/pcie-xilinx.c')
-rw-r--r-- | drivers/pci/host/pcie-xilinx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index de1c758d17d7..ec2844aeecce 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -221,13 +221,15 @@ static void xilinx_pcie_destroy_msi(unsigned int irq) { struct msi_desc *msi; struct xilinx_pcie_port *port; + struct irq_data *d = irq_get_irq_data(irq); + irq_hw_number_t hwirq = irqd_to_hwirq(d); - if (!test_bit(irq, msi_irq_in_use)) { + if (!test_bit(hwirq, msi_irq_in_use)) { msi = irq_get_msi_desc(irq); port = msi_desc_to_pci_sysdata(msi); dev_err(port->dev, "Trying to free unused MSI#%d\n", irq); } else { - clear_bit(irq, msi_irq_in_use); + clear_bit(hwirq, msi_irq_in_use); } } |