From e6755f65c4d3ef597d935c293526c98050f38ab1 Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 19 May 2021 20:10:38 +0000 Subject: [PATCH] Only advertise MSI support if there is an MSI controller of some sort. ok patrick@ --- sys/dev/fdt/pciecam.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/pciecam.c b/sys/dev/fdt/pciecam.c index b65ab3cf6a7..cae85bdae80 100644 --- a/sys/dev/fdt/pciecam.c +++ b/sys/dev/fdt/pciecam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciecam.c,v 1.1 2021/05/17 19:43:37 kettenis Exp $ */ +/* $OpenBSD: pciecam.c,v 1.2 2021/05/19 20:10:38 kettenis Exp $ */ /* * Copyright (c) 2013,2017 Patrick Wildt * @@ -262,7 +262,10 @@ pciecam_attach(struct device *parent, struct device *self, void *aux) pba.pba_pc = &sc->sc_pc; pba.pba_domain = pci_ndomains++; pba.pba_bus = 0; - pba.pba_flags |= PCI_FLAGS_MSI_ENABLED; + + if (OF_getproplen(sc->sc_node, "msi-map") > 0 || + OF_getproplen(sc->sc_node, "msi-parent") > 0) + pba.pba_flags |= PCI_FLAGS_MSI_ENABLED; config_found(self, &pba, NULL); } -- 2.20.1