Skip to content

Commit

Permalink
PCI: designware: Reject MSI-X IRQs
Browse files Browse the repository at this point in the history
The DesignWare PCIe MSI hardware does not support MSI-X IRQs.  Setting
those up failed as a side effect of a bug which was fixed by 91f8ae8
("PCI: designware: Setup and clear exactly one MSI at a time").

Now that this bug is fixed, MSI-X IRQs need to be rejected explicitly;
otherwise devices trying to use them may end up with incorrectly working
interrupts.

Fixes: 91f8ae8 ("PCI: designware: Setup and clear exactly one MSI at a time")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
CC: stable@vger.kernel.org	# v3.18+
  • Loading branch information
Lucas Stach authored and Bjorn Helgaas committed Jan 27, 2015
1 parent f175aa2 commit 19c5392
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pci/host/pcie-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
struct msi_msg msg;
struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);

if (desc->msi_attrib.is_msix)
return -EINVAL;

irq = assign_irq(1, desc, &pos);
if (irq < 0)
return irq;
Expand Down

0 comments on commit 19c5392

Please sign in to comment.