mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Fix vector number check.
ok kevlo@, patrick@
This commit is contained in:
parent
954e2a2724
commit
35b7f40312
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user