From f57a0847d232b20880af1d83fdde1e09a828e43f Mon Sep 17 00:00:00 2001 From: soda Date: Thu, 31 May 2001 20:56:29 +0000 Subject: [PATCH] fix off by one error. extra one page is needed for the case where buffer is not page aligned (e.g. raw i/o case). --- sys/arch/arc/jazz/dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/arc/jazz/dma.c b/sys/arch/arc/jazz/dma.c index 7c145aa6d6ea..645a532920f8 100644 --- a/sys/arch/arc/jazz/dma.c +++ b/sys/arch/arc/jazz/dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: dma.c,v 1.5 2001/05/25 23:57:06 tsutsui Exp $ */ +/* $NetBSD: dma.c,v 1.6 2001/05/31 20:56:29 soda Exp $ */ /* $OpenBSD: dma.c,v 1.5 1998/03/01 16:49:57 niklas Exp $ */ /* @@ -252,7 +252,7 @@ asc_dma_init(sc) sc->end = picaDmaEnd; sc->dma_reg = (pDmaReg)R4030_SYS_DMA0_REGS; - sc->pte_size = MAXPHYS / JAZZ_DMA_PAGE_SIZE; + sc->pte_size = (MAXPHYS / JAZZ_DMA_PAGE_SIZE) + 1; sc->mode = R4030_DMA_MODE_160NS | R4030_DMA_MODE_16; picaDmaTLBAlloc(sc); } @@ -283,7 +283,7 @@ fdc_dma_init(dma_softc_t *sc) sc->dma_reg = (pDmaReg)R4030_SYS_DMA1_REGS; break; } - sc->pte_size = MAXPHYS / JAZZ_DMA_PAGE_SIZE; + sc->pte_size = (MAXPHYS / JAZZ_DMA_PAGE_SIZE) + 1; sc->mode = R4030_DMA_MODE_160NS | R4030_DMA_MODE_8; picaDmaTLBAlloc(sc); }