diff options
| author | bouyer <bouyer@NetBSD.org> | 2003-11-07 08:58:33 +0000 |
|---|---|---|
| committer | bouyer <bouyer@NetBSD.org> | 2003-11-07 08:58:33 +0000 |
| commit | eb42e75cd8cf705b697196549501e552d03398c3 (patch) | |
| tree | 815fadb4df7ae86d597294de9f8c8a2f67058844 /sys/dev | |
| parent | 57ddb40e824f6442f0ce7cd8788443a298a11791 (diff) | |
If we already have a channel reset pending, don't try to queue a new one.
Otherwise we would bump queue_freeze several times, but the kernel thread would
decrease it only one time.
Fix PR kern/23377 by Mattias Karlsson, and should also fix similar problem
reported by Mihai CHELARU and Bruce J.A. Nourish on current-users.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/wdc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index e0b7627bc24..54be4f2ce28 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.152 2003/11/02 11:07:46 wiz Exp $ */ +/* $NetBSD: wdc.c,v 1.153 2003/11/07 08:58:33 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.152 2003/11/02 11:07:46 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.153 2003/11/07 08:58:33 bouyer Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -1082,6 +1082,10 @@ wdc_reset_channel(drvp, flags) chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive), DEBUG_FUNCS); if ((flags & AT_POLL) == 0) { + if (chp->ch_flags & WDCF_TH_RESET) { + /* no need to schedule a reset more than one time */ + return; + } chp->ch_flags |= WDCF_TH_RESET; chp->ch_queue->queue_freeze++; wakeup(&chp->thread); |
