From 866bc1b26786e74473882e90b2eeb90e701d58f3 Mon Sep 17 00:00:00 2001 From: cgd Date: Sat, 19 Jul 1997 06:39:22 +0000 Subject: [PATCH] sync with dev/isa/wd.c rev. 1.162: >date: 1997/07/18 00:26:22; author: fvdl; state: Exp; lines: +10 -10 >Work around possible race condition with 2 drives on one controller >in wd_get_parms. PR 3773, from Onno van der Linden (onno@simplex.nl) S: ---------------------------------------------------------------------- --- sys/arch/alpha/isa/awd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arch/alpha/isa/awd.c b/sys/arch/alpha/isa/awd.c index 945a2d0dd80f..30658ab28bec 100644 --- a/sys/arch/alpha/isa/awd.c +++ b/sys/arch/alpha/isa/awd.c @@ -1,4 +1,4 @@ -/* $NetBSD: awd.c,v 1.7 1997/07/17 03:16:39 jtk Exp $ */ +/* $NetBSD: awd.c,v 1.8 1997/07/19 06:39:22 cgd Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -593,21 +593,21 @@ wdcstart(wdc) panic("wdcstart: controller still active"); #endif - /* - * XXX - * This is a kluge. See comments in wd_get_parms(). - */ - if ((wdc->sc_flags & WDCF_WANTED) != 0) { - wdc->sc_flags &= ~WDCF_WANTED; - wakeup(wdc); - return; - } loop: /* Is there a drive for the controller to do a transfer with? */ wd = wdc->sc_drives.tqh_first; - if (wd == NULL) + if (wd == NULL) { + /* + * XXX + * This is a kluge. See comments in wd_get_parms(). + */ + if ((wdc->sc_flags & WDCF_WANTED) != 0) { + wdc->sc_flags &= ~WDCF_WANTED; + wakeup(wdc); + } return; + } /* Is there a transfer to this drive? If not, deactivate drive. */ bp = wd->sc_q.b_actf;