From: patrick Date: Fri, 5 Jul 2024 22:53:57 +0000 (+0000) Subject: When trying to enable multiple MSI vectors, check the flag first whether X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=35ee0dc20abac1f6f4050bebf66979f24e1ce316;p=openbsd When trying to enable multiple MSI vectors, check the flag first whether or not it's supported. This allows qwx(4) to properly handle missing support for that and switch back to a single MSI vector. ok kettenis@ --- diff --git a/sys/arch/arm64/dev/pci_machdep.c b/sys/arch/arm64/dev/pci_machdep.c index 86b8edd679f..fbfb07e56d4 100644 --- a/sys/arch/arm64/dev/pci_machdep.c +++ b/sys/arch/arm64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.6 2024/02/03 10:37:25 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.7 2024/07/05 22:53:57 patrick Exp $ */ /* * Copyright (c) 2019 Mark Kettenis @@ -32,7 +32,7 @@ pci_intr_enable_msivec(struct pci_attach_args *pa, int num_vec) pcireg_t reg; int mmc, mme, off; - if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 || + if ((pa->pa_flags & PCI_FLAGS_MSIVEC_ENABLED) == 0 || pci_get_capability(pc, tag, PCI_CAP_MSI, &off, ®) == 0) return 1;