summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_mcx.c
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2021-07-23 00:29:15 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2021-07-23 00:29:15 +0000
commit274f146348711bd112b8e750f807d87cededecb5 (patch)
treedc0fbf5d052cd58c055b64da8bf3d54539c58221 /sys/dev/pci/if_mcx.c
parent00f2297936adb62565eb37a0c55daf8af14b7dad (diff)
pci_intr_msix_count() is the function that drivers using multiple MSI-X
vectors use to decide whether to use MSI-X, so make it return 0 if MSI is not enabled for the device. fixes problems with ix(4) on older amd64 hardware and current riscv64 ok kettenis@ dlg@
Diffstat (limited to 'sys/dev/pci/if_mcx.c')
-rw-r--r--sys/dev/pci/if_mcx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 99b7c5f8d62..d9fbe3e6dba 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.101 2021/06/02 19:16:11 patrick Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.102 2021/07/23 00:29:14 jmatthew Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -2831,7 +2831,7 @@ mcx_attach(struct device *parent, struct device *self, void *aux)
goto teardown;
}
- msix = pci_intr_msix_count(pa->pa_pc, pa->pa_tag);
+ msix = pci_intr_msix_count(pa);
if (msix < 2) {
printf(": not enough msi-x vectors\n");
goto teardown;