summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/asc.c
diff options
context:
space:
mode:
authorsmpatel <smpatel@FreeBSD.org>1996-04-08 19:40:57 +0000
committersmpatel <smpatel@FreeBSD.org>1996-04-08 19:40:57 +0000
commit9739208301bc36d96e6ef8313564ffab2b3f9672 (patch)
tree04abd4e981231946f91239e5c13892fc0164eae0 /sys/i386/isa/asc.c
parent6b740ac6e985dfbea2d7e3601a151a088b4bb8c0 (diff)
downloadFreeBSD-src-9739208301bc36d96e6ef8313564ffab2b3f9672.zip
FreeBSD-src-9739208301bc36d96e6ef8313564ffab2b3f9672.tar.gz
Update drivers to use isa_dma_acquire() and isa_dma_release()
Reviewed by: bde
Diffstat (limited to 'sys/i386/isa/asc.c')
-rw-r--r--sys/i386/isa/asc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index a6eca29..da8c7a2 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * $Id: asc.c,v 1.16 1996/01/27 00:53:55 bde Exp $
+ * $Id: asc.c,v 1.17 1996/03/28 14:28:35 scrappy Exp $
*/
#include "asc.h"
@@ -604,6 +604,9 @@ ascopen(dev_t dev, int flags, int fmt, struct proc *p)
lprintf("asc%d.open: already open", unit);
return EBUSY;
}
+ if (isa_dma_acquire(scu->dma_num))
+ return(EBUSY);
+
scu->flags = ATTACHED | OPEN;
asc_reset(scu);
@@ -668,6 +671,7 @@ ascclose(dev_t dev, int flags, int fmt, struct proc *p)
scu->cfg_byte &= ~ scu->int_byte ; /* disable scanner int */
outb(ASC_CFG, scu->cfg_byte);
/* --- disable dma controller ? --- */
+ isa_dma_release(scu->dma_num);
/* --- disable interrupts on the controller (sub_24) --- */
scu->sbuf.base = NULL;
OpenPOWER on IntegriCloud