summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2000-07-17 01:28:16 +0000
committerthorpej <thorpej@NetBSD.org>2000-07-17 01:28:16 +0000
commitcd6fa19644a7e71648821f378d94f5a32ea07d07 (patch)
tree8062b9e1bd933daca5a60bbd2fd89f88643965c5 /sys/dev
parenteb738db50fb49b2df353c2ae5d1705389c42ef58 (diff)
Make sure to get the upper 5 bits of the page address mixed in
in IOASIC_DMA_ADDR(), as the le_ioasic attachment does. Noted by Gregory McGarry.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/tc/ioasicreg.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/tc/ioasicreg.h b/sys/dev/tc/ioasicreg.h
index 693af028fef..e3673ce33ae 100644
--- a/sys/dev/tc/ioasicreg.h
+++ b/sys/dev/tc/ioasicreg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ioasicreg.h,v 1.3 2000/05/28 06:13:40 gmcgarry Exp $ */
+/* $NetBSD: ioasicreg.h,v 1.4 2000/07/17 01:28:16 thorpej Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995 Carnegie Mellon University
@@ -186,7 +186,8 @@
(reg) = (((val)<<IOASIC_DMAPTR_SHIFT)&IOASIC_DMAPTR_MASK)
#define IOASIC_DMAPTR_GET(reg,val) \
(val) = (((reg)&IOASIC_DMAPTR_MASK)>>IOASIC_DMAPTR_SHIFT)
-#define IOASIC_DMA_ADDR(p) (((unsigned)p) << (5-2))
+#define IOASIC_DMA_ADDR(p) \
+ ((((p) << 3) & ~0x1f) | (((p) >> 29) & 0x1f))
/* For the LANCE DMA pointer register initialization the above suffices */