Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Fix off-by-one error in iommu_dvmamap_l...



details:   https://anonhg.NetBSD.org/src/rev/f559216d5931
branches:  trunk
changeset: 526907:f559216d5931
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon May 13 21:01:15 2002 +0000

description:
Fix off-by-one error in iommu_dvmamap_load_raw() where if a DMA segment
has just one byte on a page the page is never mapped into the IOMMU.

diffstat:

 sys/arch/sparc64/dev/iommu.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b2f30f5f1b02 -r f559216d5931 sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c      Mon May 13 20:30:07 2002 +0000
+++ b/sys/arch/sparc64/dev/iommu.c      Mon May 13 21:01:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommu.c,v 1.50 2002/03/20 18:54:47 eeh Exp $   */
+/*     $NetBSD: iommu.c,v 1.51 2002/05/13 21:01:15 eeh Exp $   */
 
 /*
  * Copyright (c) 2001, 2002 Eduardo Horvath
@@ -821,7 +821,7 @@
                                panic("iommu_dmamap_load_raw: size botch");
 
                        /* Now map a series of pages. */
-                       while (dvmaddr < sgend) {
+                       while (dvmaddr <= sgend) {
                                DPRINTF(IDB_BUSDMA,
                                        ("iommu_dvmamap_load_raw: map %p "
                                                "loading va %lx at pa %lx\n",



Home | Main Index | Thread Index | Old Index