summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-07-03 23:27:54 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-07-03 23:27:54 +0000
commit50b2f259142ff2cb41113da5eb1209ebd7833d42 (patch)
tree60797f8fa46cefaa05e6107b49ef387f71300966 /sys
parentfbfada6b0552a558578f183f0cc22dba33fc7435 (diff)
blacklist MSI on intel m.2 optane parts. it just doesnt work there.
discovered by jmatthew@ tweaks and ok jsg@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/nvme_pci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/nvme_pci.c b/sys/dev/pci/nvme_pci.c
index 7778cd6f235..01d78839823 100644
--- a/sys/dev/pci/nvme_pci.c
+++ b/sys/dev/pci/nvme_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme_pci.c,v 1.5 2016/11/10 11:56:41 mpi Exp $ */
+/* $OpenBSD: nvme_pci.c,v 1.6 2017/07/03 23:27:53 dlg Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -77,6 +77,10 @@ nvme_pci_match(struct device *parent, void *match, void *aux)
return (0);
}
+static const struct pci_matchid nvme_msi_blacklist[] = {
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_OPTANE },
+};
+
void
nvme_pci_attach(struct device *parent, struct device *self, void *aux)
{
@@ -90,6 +94,9 @@ nvme_pci_attach(struct device *parent, struct device *self, void *aux)
psc->psc_pc = pa->pa_pc;
sc->sc_dmat = pa->pa_dmat;
+ if (pci_matchbyid(pa, nvme_msi_blacklist, nitems(nvme_msi_blacklist)))
+ CLR(pa->pa_flags, PCI_FLAGS_MSI_ENABLED);
+
maptype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, NVME_PCI_BAR);
if (pci_mapreg_map(pa, NVME_PCI_BAR, maptype, 0,
&sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_ios, 0) != 0) {