From bd519fa01f8614e7dcd359cb8428f6ff0273f9d6 Mon Sep 17 00:00:00 2001 From: niklas Date: Wed, 31 Jan 1996 22:10:21 +0000 Subject: [PATCH] from netbsd: make sure master enable is set. Call disk_busy() a bit earlier in case an exceptional condition causes fddone() (and thus disk_unbusy()) to be called directly from fdstart(). Pointed out by Ezra Story . --- sys/arch/amiga/dev/fd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/arch/amiga/dev/fd.c b/sys/arch/amiga/dev/fd.c index dcb342afb0b..699b917edce 100644 --- a/sys/arch/amiga/dev/fd.c +++ b/sys/arch/amiga/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.22 1996/01/07 22:01:50 thorpej Exp $ */ +/* $NetBSD: fd.c,v 1.25 1996/01/28 19:48:39 chopps Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -360,7 +360,7 @@ fdattach(pdp, dp, auxp) /* * enable disk related interrupts */ - custom.dmacon = DMAF_SETCLR | DMAF_DISK; + custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_DISK; /* XXX why softint */ custom.intena = INTF_SETCLR |INTF_SOFTINT | INTF_DSKBLK; ciaa.icr = CIA_ICR_IR_SC | CIA_ICR_FLG; @@ -1115,6 +1115,12 @@ fdstart(sc) return; } + /* + * Mark us as busy now, in case fddone() gets called in one + * of the cases below. + */ + disk_busy(&sc->dkdev); + /* * make sure same disk is loaded */ @@ -1170,9 +1176,6 @@ fdstart(sc) */ trk = bp->b_blkno / sc->nsectors; - /* Instrumentation. */ - disk_busy(&sc->dkdev); - /* * check to see if same as currently cached track * if so we need to do no dma read. -- 2.20.1