aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-18 08:19:48 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-20 15:14:30 -0400
commit830cbe4b7a918613276aa3d3b28d24410623f92c (patch)
tree51681a940c786dcda6029d0cf13639feb491dc0e
parentda343fc776e0bcb238b65d9d24610819b95d0ef4 (diff)
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: 31f614edb726fcc4d5aa0f2895fbdec9b04a3ca4 ('irqchip: armada-370-xp: implement MSI support') Cc: <stable@vger.kernel.org> # v3.13+ Signed-off-by: Thomas 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: Neil Greatorex <neil@fatboyfat.co.uk> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--drivers/irqchip/irq-armada-370-xp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 3c8d89b62a21..78b0ac9129d7 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -162,6 +162,15 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
162 armada_370_xp_free_msi(d->hwirq); 162 armada_370_xp_free_msi(d->hwirq);
163} 163}
164 164
165static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev,
166 int nvec, int type)
167{
168 /* We support MSI, but not MSI-X */
169 if (type == PCI_CAP_ID_MSI)
170 return 0;
171 return -EINVAL;
172}
173
165static struct irq_chip armada_370_xp_msi_irq_chip = { 174static struct irq_chip armada_370_xp_msi_irq_chip = {
166 .name = "armada_370_xp_msi_irq", 175 .name = "armada_370_xp_msi_irq",
167 .irq_enable = unmask_msi_irq, 176 .irq_enable = unmask_msi_irq,
@@ -200,6 +209,7 @@ static int armada_370_xp_msi_init(struct device_node *node,
200 209
201 msi_chip->setup_irq = armada_370_xp_setup_msi_irq; 210 msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
202 msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; 211 msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
212 msi_chip->check_device = armada_370_xp_check_msi_device;
203 msi_chip->of_node = node; 213 msi_chip->of_node = node;
204 214
205 armada_370_xp_msi_domain = 215 armada_370_xp_msi_domain =