summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1993-10-16 03:55:59 +0000
committermycroft <mycroft@NetBSD.org>1993-10-16 03:55:59 +0000
commitc73d85d3418023209d7c6d1a9d8bfa9df2d16724 (patch)
tree8e441bc6e66901809603127189a4717ff6e1097c /sys/dev
parent1016b2b6268363515eaf9ebc6e92f2ade90c6258 (diff)
Panic if DMA with odd length attempted on a 16-bit channel.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/isadma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c
index c1481bba203..9a9421df1cd 100644
--- a/sys/dev/isa/isadma.c
+++ b/sys/dev/isa/isadma.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isadma.c,v 1.1 1993/10/14 05:22:57 mycroft Exp $
+ * $Id: isadma.c,v 1.2 1993/10/16 03:55:59 mycroft Exp $
*/
/*
@@ -123,7 +123,7 @@ at_dma(read, addr, nbytes, chan)
if (chan > 7 ||
(chan < 4 && nbytes > (1<<16)) ||
- (chan >= 4 && (nbytes > (1<<17) || (u_int)addr & 1)))
+ (chan >= 4 && (nbytes > (1<<17) || nbytes & 1 || (u_int)addr & 1)))
panic("at_dma: impossible request");
if (at_dma_rangecheck((vm_offset_t)addr, nbytes, chan)) {