freese->freeze, as pointed out by Frederick Bruck.
This commit is contained in:
parent
b94b22f9f5
commit
14cd9d8cff
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ata_wdc.c,v 1.41 2003/10/08 10:58:12 bouyer Exp $ */
|
||||
/* $NetBSD: ata_wdc.c,v 1.42 2003/10/29 22:05:15 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.41 2003/10/08 10:58:12 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.42 2003/10/29 22:05:15 bouyer Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -224,7 +224,7 @@ wdc_ata_bio_start(chp, xfer)
|
|||
/* If it's not a polled command, we need the kenrel thread */
|
||||
if ((xfer->c_flags & C_POLL) == 0 &&
|
||||
(chp->ch_flags & WDCF_TH_RUN) == 0) {
|
||||
chp->ch_queue->queue_freese++;
|
||||
chp->ch_queue->queue_freeze++;
|
||||
wakeup(&chp->thread);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc.c,v 1.147 2003/10/29 21:44:41 bouyer Exp $ */
|
||||
/* $NetBSD: wdc.c,v 1.148 2003/10/29 22:05:15 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
|
||||
|
@ -70,7 +70,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.147 2003/10/29 21:44:41 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.148 2003/10/29 22:05:15 bouyer Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -272,7 +272,7 @@ atabus_thread(arg)
|
|||
s = splbio();
|
||||
if ((chp->ch_flags & (WDCF_TH_RESET | WDCF_SHUTDOWN)) == 0 &&
|
||||
((chp->ch_flags & WDCF_ACTIVE) == 0 ||
|
||||
chp->ch_queue->queue_freese == 0)) {
|
||||
chp->ch_queue->queue_freeze == 0)) {
|
||||
chp->ch_flags &= ~WDCF_TH_RUN;
|
||||
tsleep(&chp->thread, PRIBIO, "atath", 0);
|
||||
chp->ch_flags |= WDCF_TH_RUN;
|
||||
|
@ -288,22 +288,22 @@ atabus_thread(arg)
|
|||
chp->ch_drive[drive].state = 0;
|
||||
}
|
||||
chp->ch_flags &= ~WDCF_TH_RESET;
|
||||
chp->ch_queue->queue_freese--;
|
||||
chp->ch_queue->queue_freeze--;
|
||||
wdcstart(chp);
|
||||
} else if ((chp->ch_flags & WDCF_ACTIVE) != 0 &&
|
||||
chp->ch_queue->queue_freese == 1) {
|
||||
chp->ch_queue->queue_freeze == 1) {
|
||||
/*
|
||||
* caller has bumped queue_freese, decrease it
|
||||
* caller has bumped queue_freeze, decrease it
|
||||
*/
|
||||
chp->ch_queue->queue_freese--;
|
||||
chp->ch_queue->queue_freeze--;
|
||||
xfer = chp->ch_queue->sc_xfer.tqh_first;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (xfer == NULL)
|
||||
panic("channel active with no xfer ?");
|
||||
#endif
|
||||
xfer->c_start(chp, xfer);
|
||||
} else if (chp->ch_queue->queue_freese > 1) {
|
||||
panic("queue_freese");
|
||||
} else if (chp->ch_queue->queue_freeze > 1) {
|
||||
panic("queue_freeze");
|
||||
}
|
||||
splx(s);
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ wdcattach(chp)
|
|||
inited++;
|
||||
}
|
||||
TAILQ_INIT(&chp->ch_queue->sc_xfer);
|
||||
chp->ch_queue->queue_freese = 0;
|
||||
chp->ch_queue->queue_freeze = 0;
|
||||
|
||||
chp->atabus = config_found(&chp->wdc->sc_dev, chp, atabusprint);
|
||||
}
|
||||
|
@ -988,7 +988,7 @@ wdcstart(chp)
|
|||
if ((chp->ch_flags & WDCF_ACTIVE) != 0 ) {
|
||||
return; /* channel aleady active */
|
||||
}
|
||||
if (__predict_false(chp->ch_queue->queue_freese > 0)) {
|
||||
if (__predict_false(chp->ch_queue->queue_freeze > 0)) {
|
||||
return; /* queue froozen */
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
|
@ -1083,7 +1083,7 @@ wdc_reset_channel(drvp, flags)
|
|||
DEBUG_FUNCS);
|
||||
if ((flags & AT_POLL) == 0) {
|
||||
chp->ch_flags |= WDCF_TH_RESET;
|
||||
chp->ch_queue->queue_freese++;
|
||||
chp->ch_queue->queue_freeze++;
|
||||
wakeup(&chp->thread);
|
||||
return;
|
||||
}
|
||||
|
@ -1319,10 +1319,10 @@ wdcwait(chp, mask, bits, timeout, flags)
|
|||
* ask the thread to come back here
|
||||
*/
|
||||
#ifdef DIAGNOSTIC
|
||||
if (chp->ch_queue->queue_freese > 0)
|
||||
panic("wdcwait: queue_freese");
|
||||
if (chp->ch_queue->queue_freeze > 0)
|
||||
panic("wdcwait: queue_freeze");
|
||||
#endif
|
||||
chp->ch_queue->queue_freese++;
|
||||
chp->ch_queue->queue_freeze++;
|
||||
wakeup(&chp->thread);
|
||||
return(WDCWAIT_THR);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdcvar.h,v 1.41 2003/10/08 10:58:12 bouyer Exp $ */
|
||||
/* $NetBSD: wdcvar.h,v 1.42 2003/10/29 22:05:15 bouyer Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
struct channel_queue { /* per channel queue (may be shared) */
|
||||
TAILQ_HEAD(xferhead, wdc_xfer) sc_xfer;
|
||||
int queue_freese;
|
||||
int queue_freeze;
|
||||
};
|
||||
|
||||
struct channel_softc { /* Per channel data */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atapi_wdc.c,v 1.60 2003/10/15 19:54:32 bouyer Exp $ */
|
||||
/* $NetBSD: atapi_wdc.c,v 1.61 2003/10/29 22:05:15 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.60 2003/10/15 19:54:32 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.61 2003/10/29 22:05:15 bouyer Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -420,7 +420,7 @@ wdc_atapi_start(chp, xfer)
|
|||
/* If it's not a polled command, we need the kenrel thread */
|
||||
if ((sc_xfer->xs_control & XS_CTL_POLL) == 0 &&
|
||||
(chp->ch_flags & WDCF_TH_RUN) == 0) {
|
||||
chp->ch_queue->queue_freese++;
|
||||
chp->ch_queue->queue_freeze++;
|
||||
wakeup(&chp->thread);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue