From f5b15ebcd3edfa52a4c8eaa1ef2dd88a60196285 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 18 May 2011 20:02:17 +0000 Subject: dma: comment --- sys/src/9/pc/dma.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/src/9/pc/dma.c b/sys/src/9/pc/dma.c index 4a81f516a..2370442e1 100644 --- a/sys/src/9/pc/dma.c +++ b/sys/src/9/pc/dma.c @@ -212,12 +212,15 @@ dmasetup(int chan, void *va, long len, int flags) else xp->len = 0; + mode = ((flags & DMAREAD) ? 0x44 : 0x48) | /* read or write */ + ((flags & DMALOOP) ? 0x10 : 0) | /* auto init mode */ + chan; + /* * this setup must be atomic */ ilock(dp); - mode = ((flags & DMAREAD) ? 0x44 : 0x48) | ((flags & DMALOOP) ? 0x10 : 0) | chan; - outb(dp->mode, mode); /* single mode dma (give CPU a chance at mem) */ + outb(dp->mode, mode); outb(dp->page[chan], pa>>16); outb(dp->cbp, 0); /* set count & address to their first byte */ outb(dp->addr[chan], pa>>dp->shift); /* set address */ -- cgit v1.2.3