summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-12 21:41:51 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-12 21:41:51 +0200
commit25db69188e0369a8c4ac53f71e935a8b6e22e117 (patch)
treea371b975f33f280e1c3e43e9c920d578805312ab /kernel
parentMerge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff)
parentgenirq/msi: Make sure PCI MSIs are activated early (diff)
downloadlinux-25db69188e0369a8c4ac53f71e935a8b6e22e117.tar.xz
linux-25db69188e0369a8c4ac53f71e935a8b6e22e117.zip
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;