Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/sparc Oops, mspcic_bus_mmap was, effectively, ...



details:   https://anonhg.NetBSD.org/src/rev/8c42012cfd14
branches:  trunk
changeset: 526688:8c42012cfd14
user:      uwe <uwe%NetBSD.org@localhost>
date:      Wed May 08 16:51:39 2002 +0000

description:
Oops, mspcic_bus_mmap was, effectively, adding offset twice.
While here, add __KERNEL_RCSID.

diffstat:

 sys/arch/sparc/sparc/msiiep.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 895b3f10a93a -r 8c42012cfd14 sys/arch/sparc/sparc/msiiep.c
--- a/sys/arch/sparc/sparc/msiiep.c     Wed May 08 16:32:54 2002 +0000
+++ b/sys/arch/sparc/sparc/msiiep.c     Wed May 08 16:51:39 2002 +0000
@@ -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 <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.8 2002/05/08 16:51:39 uwe Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -564,10 +566,12 @@
        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));
 }
 
 



Home | Main Index | Thread Index | Old Index