summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-01-27 02:33:48 +0000
committerbde <bde@FreeBSD.org>1996-01-27 02:33:48 +0000
commitb367666afd7d12a7802e173170448bcd9f13d89b (patch)
tree89c9bb6e9d083a3f547ce32b8b591b9a773993b4 /sys/dev/fdc
parentae64a265a89555df45a3ad36f4cb2ef096386a30 (diff)
downloadFreeBSD-src-b367666afd7d12a7802e173170448bcd9f13d89b.zip
FreeBSD-src-b367666afd7d12a7802e173170448bcd9f13d89b.tar.gz
Allocate DMA bounce buffers only when requested by drivers. Only the
fd and wt drivers need bounce buffers, so this normally saves 32K-1K of kernel memory. Keep track of which DMA channels are busy. isa_dmadone() must now be called when DMA has finished or been aborted. Panic for unallocated and too-small (required) bounce buffers. fd.c: There will be new warnings about isa_dmadone() not being called after DMA has been aborted. sound/dmabuf.c: isa_dmadone() needs more parameters than are available, so temporarily use a new interface isa_dmadone_nobounce() to avoid having to worry about panics for fake parameters. Untested.
Diffstat (limited to 'sys/dev/fdc')
-rw-r--r--sys/dev/fdc/fdc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 4a16c7c..2470803 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.76 1995/12/10 13:38:29 phk Exp $
+ * $Id: fd.c,v 1.77 1995/12/10 19:44:45 bde Exp $
*
*/
@@ -574,6 +574,7 @@ fdattach(struct isa_device *dev)
fdc->fdcu = fdcu;
fdc->flags |= FDC_ATTACHED;
fdc->dmachan = dev->id_drq;
+ isa_dmainit(fdc->dmachan, 128 << 3 /* XXX max secsize */);
fdc->state = DEVIDLE;
/* reset controller, turn motor off, clear fdout mirror reg */
outb(fdc->baseport + FDOUT, ((fdc->fdout = 0)));
OpenPOWER on IntegriCloud