ref: f5b15ebcd3edfa52a4c8eaa1ef2dd88a60196285
parent: df687d3840503e4811a5572bf5ce97b74cb21727
author: cinap_lenrek <cinap_lenrek@localhost>
date: Wed May 18 16:02:17 EDT 2011
dma: comment
--- a/sys/src/9/pc/dma.c
+++ b/sys/src/9/pc/dma.c
@@ -212,12 +212,15 @@
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 */