diff options
author | 2018-07-28 13:59:08 +0000 | |
---|---|---|
committer | 2018-07-28 13:59:08 +0000 | |
commit | 0045467ffa1d394483c2d8b3a719fb97b71c21f8 (patch) | |
tree | f4460a6674d9ba051d6037b84ded09e7cb9ae798 /sys/dev/fdt/dwpcie.c | |
parent | Move libsndio session cookie in its own $HOME/.sndio/ directory to (diff) | |
download | wireguard-openbsd-0045467ffa1d394483c2d8b3a719fb97b71c21f8.tar.xz wireguard-openbsd-0045467ffa1d394483c2d8b3a719fb97b71c21f8.zip |
Make use of PCI_FLAGS_MSI_ENABLED such that drivers for hardware with broken
MSI support can selectively disable the use of MSI.
Diffstat (limited to 'sys/dev/fdt/dwpcie.c')
-rw-r--r-- | sys/dev/fdt/dwpcie.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index 6720dc75bea..f56857ca208 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $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> * @@ -324,6 +324,7 @@ dwpcie_attach(struct device *parent, struct device *self, void *aux) 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); } @@ -534,7 +535,8 @@ dwpcie_intr_map_msi(struct pci_attach_args *pa, pci_intr_handle_t *ihp) 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); |