git: 9front

Download patch

ref: 9326778b6edc71a44386a17684c8fc11c84db3ff
parent: 1913f4f87c592cae5290a56c5bbc0602984bf7bc
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 */
--