summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-12 12:41:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-12 12:41:51 -0700
commit25db69188e0369a8c4ac53f71e935a8b6e22e117 (patch)
treea371b975f33f280e1c3e43e9c920d578805312ab /kernel
parent0e1117b2572b82ddc329d570f7c9bab355e4dc3b (diff)
parentf3b0946d629c8bfbd3e5f038e30cb9c711a35f10 (diff)
downloadlinux-25db69188e0369a8c4ac53f71e935a8b6e22e117.tar.bz2
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Ingo Molnar: "A fix for an MSI regression" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/msi: Make sure PCI MSIs are activated early
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/msi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 54999350162c..19e9dfbe97fa 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -359,6 +359,17 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
else
dev_dbg(dev, "irq [%d-%d] for MSI\n",
virq, virq + desc->nvec_used - 1);
+ /*
+ * This flag is set by the PCI layer as we need to activate
+ * the MSI entries before the PCI layer enables MSI in the
+ * card. Otherwise the card latches a random msi message.
+ */
+ if (info->flags & MSI_FLAG_ACTIVATE_EARLY) {
+ struct irq_data *irq_data;
+
+ irq_data = irq_domain_get_irq_data(domain, desc->irq);
+ irq_domain_activate_irq(irq_data);
+ }
}
return 0;