From 3942dbbdac622faa3a34c2ed85791411502cc657 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Jul 1999 19:45:33 +0000 Subject: fix braino.. accidentally replaced PAGE_MASK with PAGE_SIZE. (PAGE_MASK is PAGE_SIZE - 1) bug does not manifest itself on our hardware..... --- sys/pci/ide_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 1449b3e..6114b4f 100644 --- a/sys/pci/ide_pci.c +++ b/sys/pci/ide_pci.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ide_pci.c,v 1.36 1999/07/20 22:43:53 julian Exp $ + * $Id: ide_pci.c,v 1.37 1999/07/21 02:28:35 peter Exp $ */ #include "wd.h" @@ -1835,7 +1835,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir) /* Generate first PRD entry, which may be non-aligned. */ - firstpage = DMA_PG_SZ - ((uintptr_t)vaddr & DMA_PG_SZ); + firstpage = DMA_PG_SZ - ((uintptr_t)vaddr & (DMA_PG_SZ - 1)); prd_base = vtophys(vaddr); prd_count = MIN(count, firstpage); -- cgit v1.1