Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 830cbe4b authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper
Browse files

irqchip: armada-370-xp: implement the ->check_device() msi_chip operation



Until now, we were leaving the ->check_device() msi_chip operation
empty, which leads the PCI core to believe that we support both MSI
and MSI-X. In fact, we do not support MSI-X, so we have to tell this
to the PCI core by providing an implementation of this operation.

Fixes: 31f614ed ('irqchip: armada-370-xp: implement MSI support')
Cc: <stable@vger.kernel.org> # v3.13+
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397823593-1932-3-git-send-email-thomas.petazzoni@free-electrons.com


Tested-by: default avatarNeil Greatorex <neil@fatboyfat.co.uk>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent da343fc7
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -162,6 +162,15 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
	armada_370_xp_free_msi(d->hwirq);
	armada_370_xp_free_msi(d->hwirq);
}
}


static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev,
					  int nvec, int type)
{
	/* We support MSI, but not MSI-X */
	if (type == PCI_CAP_ID_MSI)
		return 0;
	return -EINVAL;
}

static struct irq_chip armada_370_xp_msi_irq_chip = {
static struct irq_chip armada_370_xp_msi_irq_chip = {
	.name = "armada_370_xp_msi_irq",
	.name = "armada_370_xp_msi_irq",
	.irq_enable = unmask_msi_irq,
	.irq_enable = unmask_msi_irq,
@@ -200,6 +209,7 @@ static int armada_370_xp_msi_init(struct device_node *node,


	msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
	msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
	msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
	msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
	msi_chip->check_device = armada_370_xp_check_msi_device;
	msi_chip->of_node = node;
	msi_chip->of_node = node;


	armada_370_xp_msi_domain =
	armada_370_xp_msi_domain =