From 274f146348711bd112b8e750f807d87cededecb5 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Fri, 23 Jul 2021 00:29:15 +0000 Subject: 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@ --- sys/dev/pci/if_ix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/if_ix.c') diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 546ee3ad3ee..45a8025c89f 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.178 2020/12/22 23:25:37 dlg Exp $ */ +/* $OpenBSD: if_ix.c,v 1.179 2021/07/23 00:29:14 jmatthew Exp $ */ /****************************************************************************** @@ -1783,7 +1783,7 @@ ixgbe_setup_msix(struct ix_softc *sc) if (!ixgbe_enable_msix) return; - nmsix = pci_intr_msix_count(pa->pa_pc, pa->pa_tag); + nmsix = pci_intr_msix_count(pa); if (nmsix <= 1) return; -- cgit v1.2.3