summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2019-05-30 05:55:10 +0000
committerjmatthew <jmatthew@openbsd.org>2019-05-30 05:55:10 +0000
commit6b87dd5dafb8289571a1535045b1dfede9b0a40f (patch)
tree09a90f706b18ba16b45b2f07b7e2e3f6b9b8932e
parentwrap some long lines, except in bits I'll probably have to rewrite soon (diff)
downloadwireguard-openbsd-6b87dd5dafb8289571a1535045b1dfede9b0a40f.tar.xz
wireguard-openbsd-6b87dd5dafb8289571a1535045b1dfede9b0a40f.zip
Mellanox support tells me that according to an internal datasheet, legacy
interrupts are not supported, leaving us with just MSI-X for mcx(4).
-rw-r--r--sys/dev/pci/if_mcx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index eeafccf3322..7ed759bc9cd 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.12 2019/05/30 03:56:26 jmatthew Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.13 2019/05/30 05:55:10 jmatthew Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -2198,9 +2198,12 @@ mcx_attach(struct device *parent, struct device *self, void *aux)
goto teardown;
}
- /* PRM makes no mention of msi interrupts, just legacy and msi-x */
- if (pci_intr_map_msix(pa, 0, &sc->sc_ih) != 0 &&
- pci_intr_map(pa, &sc->sc_ih) != 0) {
+ /*
+ * PRM makes no mention of msi interrupts, just legacy and msi-x.
+ * mellanox support tells me legacy interrupts are not supported,
+ * so we're stuck with just msi-x.
+ */
+ if (pci_intr_map_msix(pa, 0, &sc->sc_ih) != 0) {
printf(": unable to map interrupt\n");
goto teardown;
}