From afd360002d1d0bf1ec85d966c1693ff6ad152f59 Mon Sep 17 00:00:00 2001 From: uwe Date: Wed, 8 May 2002 16:51:39 +0000 Subject: [PATCH] Oops, mspcic_bus_mmap was, effectively, adding offset twice. While here, add __KERNEL_RCSID. --- sys/arch/sparc/sparc/msiiep.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/arch/sparc/sparc/msiiep.c b/sys/arch/sparc/sparc/msiiep.c index 82e6f7d80a1d..d25c84b6f68a 100644 --- a/sys/arch/sparc/sparc/msiiep.c +++ b/sys/arch/sparc/sparc/msiiep.c @@ -1,4 +1,4 @@ -/* $NetBSD: msiiep.c,v 1.7 2002/04/04 18:47:23 uwe Exp $ */ +/* $NetBSD: msiiep.c,v 1.8 2002/05/08 16:51:39 uwe Exp $ */ /* * Copyright (c) 2001 Valeriy E. Ushakov @@ -26,6 +26,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.8 2002/05/08 16:51:39 uwe Exp $"); #include #include @@ -564,10 +566,12 @@ mspcic_bus_mmap(t, ba, off, prot, flags) struct mspcic_cookie *c = t->cookie; bus_addr_t paddr; + /* verify that phys to pci mapping for the target page exists */ paddr = mspcic_pci_map_find(c->map, c->nmaps, ba + off, PAGE_SIZE); if (paddr == 0) return (-1); - return (bus_space_mmap(t->parent, paddr, off, prot, flags)); + + return (bus_space_mmap(t->parent, paddr - off, off, prot, flags)); }