summaryrefslogtreecommitdiff
path: root/sys/dev/pci/mpii.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2011-05-25 00:12:47 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2011-05-25 00:12:47 +0000
commit88ad985bb4bb835eec9debb620c6db9912e686e1 (patch)
treecd3c2de0eaae335eaa514b77fc599878039c8619 /sys/dev/pci/mpii.c
parentefcbab8676d19c3ad2b884c8249d3e40467d940c (diff)
try to map an msi style interrupt. if that doesnt work then try to map a
normal intx style interrupt. tested on a box with three mpii(4) controllers: mpii0 at pci5 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: msi mpii1 at pci8 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: msi mpii2 at pci14 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: apic 2 int 8 no functional change, ie, everything still works. it is ok to do this in mpii(4) since it is only enabled on i386 and amd64, which are the only archs to get msi code so far. discussed with and ok kettenis@
Diffstat (limited to 'sys/dev/pci/mpii.c')
-rw-r--r--sys/dev/pci/mpii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index de622dfcb2f..1cab14d016b 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.41 2011/05/15 12:03:14 jsg Exp $ */
+/* $OpenBSD: mpii.c,v 1.42 2011/05/25 00:12:46 dlg Exp $ */
/*
* Copyright (c) 2010 Mike Belopuhov <mkb@crypt.org.ru>
* Copyright (c) 2009 James Giannoules
@@ -2155,7 +2155,7 @@ mpii_attach(struct device *parent, struct device *self, void *aux)
MPII_INTR_MASK_DOORBELL);
/* hook up the interrupt */
- if (pci_intr_map(pa, &ih)) {
+ if (pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) {
printf(": unable to map interrupt\n");
goto unmap;
}