aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Greatorex <neil@fatboyfat.co.uk>2014-04-18 08:19:49 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-20 15:14:34 -0400
commitff3c664505bf8a8334bca5045e87b85cfe4d2277 (patch)
tree0ddd1688a206b8ad3998892c555a06eb124a1677
parent830cbe4b7a918613276aa3d3b28d24410623f92c (diff)
irqchip: armada-370-xp: Fix releasing of MSIs
Store the value of d->hwirq in a local variable as the real value is wiped out by calling irq_dispose_mapping. Without this patch, the armada_370_xp_free_msi function would always free MSI#0, no matter what was passed to it. Fixes: 31f614edb726fcc4d5aa0f2895fbdec9b04a3ca4 ('irqchip: armada-370-xp: implement MSI support') Cc: <stable@vger.kernel.org> # v3.13+ Signed-off-by: Neil Greatorex <neil@fatboyfat.co.uk> Link: https://lkml.kernel.org/r/1397823593-1932-4-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1397823593-1932-4-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--drivers/irqchip/irq-armada-370-xp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 78b0ac9129d7..868d11bc00d2 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -158,8 +158,10 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
158 unsigned int irq) 158 unsigned int irq)
159{ 159{
160 struct irq_data *d = irq_get_irq_data(irq); 160 struct irq_data *d = irq_get_irq_data(irq);
161 unsigned long hwirq = d->hwirq;
162
161 irq_dispose_mapping(irq); 163 irq_dispose_mapping(irq);
162 armada_370_xp_free_msi(d->hwirq); 164 armada_370_xp_free_msi(hwirq);
163} 165}
164 166
165static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev, 167static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev,