From: jsg Date: Fri, 2 Feb 2018 11:24:37 +0000 (+0000) Subject: use the same bar used to determine memory type when mapping memory X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4f6837226dc258ef156d13f3ed2b28b7a8babfa;p=openbsd use the same bar used to determine memory type when mapping memory should resolve mapping error on SAS3508 encountered by claudio@ ok jmatthew@ --- diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index 2f66ed53eba..c9ccd6a9bd3 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.45 2017/11/27 04:32:14 jmatthew Exp $ */ +/* $OpenBSD: mfii.c,v 1.46 2018/02/02 11:24:37 jsg Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -537,7 +537,7 @@ mfii_attach(struct device *parent, struct device *self, void *aux) /* wire up the bus shizz */ memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, sc->sc_iop->bar); - if (pci_mapreg_map(pa, MFII_BAR, memtype, 0, + if (pci_mapreg_map(pa, sc->sc_iop->bar, memtype, 0, &sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_ios, MFII_PCI_MEMSIZE)) { printf(": unable to map registers\n"); return;