From 35b7f403129665b7ae5c3f844572d0cb6a797892 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 2 Feb 2024 21:13:35 +0000 Subject: [PATCH] Fix vector number check. ok kevlo@, patrick@ --- sys/arch/amd64/pci/pci_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 41c65293c4d..16d2362f410 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.78 2024/01/19 18:38:16 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.79 2024/02/02 21:13:35 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -499,8 +499,8 @@ pci_intr_map_msivec(struct pci_attach_args *pa, int vec, return 1; mme = ((reg & PCI_MSI_MC_MME_MASK) >> PCI_MSI_MC_MME_SHIFT); - if (vec > (1 << mme)) - return 0; + if (vec >= (1 << mme)) + return 1; ihp->tag = PCI_MSI_PIN(tag, vec); ihp->line = APIC_INT_VIA_MSG; -- 2.20.1