summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2024-02-02 21:13:36 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2024-02-02 21:13:36 +0000
commit3f6288140a3c5d97802ebcbeb42bfb969d8a80ac (patch)
tree2ecbb6e1d516eda374cb4c09bcd657b006814428 /sys/arch
parent403831088ccc61e997648aa9f566017935e1e814 (diff)
Fix vector number check.
ok kevlo@, patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/pci/pci_machdep.c6
1 files 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;