From owner-freebsd-hackers Sun Aug 17 18:36:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA10335 for hackers-outgoing; Sun, 17 Aug 1997 18:36:19 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA10321 for ; Sun, 17 Aug 1997 18:36:11 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id LAA08486 for hackers@freebsd.org; Mon, 18 Aug 1997 11:05:38 +0930 (CST) From: Michael Smith Message-Id: <199708180135.LAA08486@genesis.atrad.adelaide.edu.au> Subject: isa_dmastop... (fwd) To: hackers@freebsd.org Date: Mon, 18 Aug 1997 11:05:37 +0930 (CST) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Ok, to avoid any further agony about ISA DMA, here's a request I've had just recently from Luigi. This looks OK to me, but again it contains the sanity checking that Amancio was unhappy about; folks, how do you feel? ----- Forwarded message from Luigi Rizzo ----- >From luigi@labinfo.iet.unipi.it Sat Aug 9 23:27:10 1997 From: Luigi Rizzo Message-Id: <199708091246.OAA01564@labinfo.iet.unipi.it> Subject: isa_dmastop... To: msmith@gsoft.com.au Date: Sat, 9 Aug 1997 14:46:19 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text For the sound driver to implement pause/abort, the following function is useful (one can do things without it if tolerates some "channel busy" messages from the kernel...) If you like it, can you commit to isa.c ? Thanks Luigi /* * this stops the dma channel and returns the residual count * derived calling isa_dmastatus */ int isa_dmastop(int chan) { if (dma_inuse & (1 << chan) == 0) printf("isa_dmastop: channel %d not acquired\n", chan); if (dma_busy & (1 << chan) == 0) printf("isa_dmastop: channel %d not acquired\n", chan); if ((chan & 4) == 0) outb(DMA1_SMSK, (chan & 3) | 4 /* disable mask */); else outb(DMA2_SMSK, (chan & 3) | 4 /* disable mask */); return isa_dmastatus(chan); } ----- End of forwarded message from Luigi Rizzo ----- -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[