summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-05-29 10:47:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-05-29 10:47:43 +0000
commit83fb6c6ddc2e180c6bcfcb9b6ff07196f5b0a6bd (patch)
treea7b530a1a5509051e861977450a787e809d2f2a4
parentb7cdf39a2b92b684f5cf98d1bf296afe8d7784cd (diff)
Don't attempt to use MSI if we're not running in APIC mode.
-rw-r--r--sys/arch/amd64/pci/pci_machdep.c4
-rw-r--r--sys/arch/i386/pci/pci_machdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c
index ec795d669d8..66f5d2f3a96 100644
--- a/sys/arch/amd64/pci/pci_machdep.c
+++ b/sys/arch/amd64/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.44 2011/05/21 15:58:27 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.45 2011/05/29 10:47:42 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -291,7 +291,7 @@ pci_intr_map_msi(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
pci_chipset_tag_t pc = pa->pa_pc;
pcitag_t tag = pa->pa_tag;
- if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 ||
+ if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 || mp_busses == NULL ||
pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
return 1;
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index 2b18b445fc9..d22f875dc77 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.60 2011/05/21 15:14:57 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.61 2011/05/29 10:47:42 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -485,7 +485,7 @@ pci_intr_map_msi(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
pci_chipset_tag_t pc = pa->pa_pc;
pcitag_t tag = pa->pa_tag;
- if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 ||
+ if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 || mp_busses == NULL ||
pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
return 1;