MSI support can selectively disable the use of MSI.
-/* $OpenBSD: acpipci.c,v 1.2 2018/07/10 17:11:42 kettenis Exp $ */
+/* $OpenBSD: acpipci.c,v 1.3 2018/07/28 13:59:08 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
pba.pba_memex = sc->sc_memex;
pba.pba_domain = pci_ndomains++;
pba.pba_bus = sc->sc_bus;
+ pba.pba_flags |= PCI_FLAGS_MSI_ENABLED;
config_found(self, &pba, NULL);
}
pcitag_t tag = pa->pa_tag;
struct acpipci_intr_handle *ih;
- if (pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
+ if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 ||
+ pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
return -1;
ih = malloc(sizeof(struct acpipci_intr_handle), M_DEVBUF, M_WAITOK);
-/* $OpenBSD: pciecam.c,v 1.3 2018/04/09 18:35:13 kettenis Exp $ */
+/* $OpenBSD: pciecam.c,v 1.4 2018/07/28 13:59:08 kettenis Exp $ */
/*
* Copyright (c) 2013,2017 Patrick Wildt <patrick@blueri.se>
*
pba.pba_pc = &sc->sc_pc;
pba.pba_domain = pci_ndomains++;
pba.pba_bus = 0;
+ pba.pba_flags |= PCI_FLAGS_MSI_ENABLED;
config_found(self, &pba, NULL);
}
pcitag_t tag = pa->pa_tag;
struct pciecam_intr_handle *ih;
- if (pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
+ if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 ||
+ pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
return 1;
ih = malloc(sizeof(struct pciecam_intr_handle), M_DEVBUF, M_WAITOK);
-/* $OpenBSD: dwpcie.c,v 1.6 2018/07/01 18:58:06 kettenis Exp $ */
+/* $OpenBSD: dwpcie.c,v 1.7 2018/07/28 13:59:08 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
pba.pba_ioex = sc->sc_ioex;
pba.pba_domain = pci_ndomains++;
pba.pba_bus = sc->sc_bus;
+ pba.pba_flags |= PCI_FLAGS_MSI_ENABLED;
config_found(self, &pba, NULL);
}
pcitag_t tag = pa->pa_tag;
struct dwpcie_intr_handle *ih;
- if (pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
+ if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 ||
+ pci_get_capability(pc, tag, PCI_CAP_MSI, NULL, NULL) == 0)
return -1;
ih = malloc(sizeof(struct dwpcie_intr_handle), M_DEVBUF, M_WAITOK);