summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2020-10-24 05:07:48 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2020-10-24 05:07:48 +0000
commit1c21489e104e9c2a058040b29e2c8c5242d140f2 (patch)
tree135668499acf6ee66d530271b4bf60bbffe64a12 /sys/arch
parentc7cf77038cb666bd62d2f1861928b89fcb0fb554 (diff)
If the #msi-eqs property says there are no event queues, don't try to set
up MSI support. stsp@ and bluhm@ ran into this on T5220s ok stsp@ kettenis@ patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/vpci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c
index a6ce5a80a2d..02a62c53745 100644
--- a/sys/arch/sparc64/dev/vpci.c
+++ b/sys/arch/sparc64/dev/vpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vpci.c,v 1.31 2020/06/25 21:43:41 jmatthew Exp $ */
+/* $OpenBSD: vpci.c,v 1.32 2020/10/24 05:07:47 jmatthew Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
*
@@ -273,6 +273,8 @@ vpci_init_msi(struct vpci_softc *sc, struct vpci_pbm *pbm)
/* One eq per cpu, limited by the number of eqs. */
num_eq = min(ncpus, getpropint(sc->sc_node, "#msi-eqs", 36));
+ if (num_eq == 0)
+ return;
if (OF_getprop(sc->sc_node, "msi-address-ranges",
msi_addr_range, sizeof(msi_addr_range)) <= 0)