Subject: kern/8639: wdc bug
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pf5y-inue@asahi-net.or.jp>
List: netbsd-bugs
Date: 10/17/1999 10:24:41
>Number: 8639
>Category: kern
>Synopsis: wdc does not wake up forever
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 17 10:24:01 1999
>Last-Modified:
>Originator: INOUE Yoshinari
>Organization:
ASAHI-NET, JAPAN
>Release: NetBSD 1.4.1
>Environment:
Casio FIVA MPC-101M32
System: NetBSD pc1-inoue.kusm.kyoto-u.ac.jp 1.4.1 NetBSD 1.4.1 (J) #47: Mon Oct 18 00:18:21 JST 1999 inoue@pc1-inoue.kusm.kyoto-u.ac.jp:/home/inoue/src/NetBSD/sys.bak/arch/i386/compile/J i386
>Description:
wdc_exec_command() does not wake up forever when __wdccommand_intr()
ignores IRQ.
>How-To-Repeat:
On Casio FIVA, NetBSD kernel with APM support fails to boot.
I believe NetBSD-current has the same bug.
>Fix:
--- wdc.c.org Thu Jun 24 09:06:01 1999
+++ wdc.c Sun Oct 17 22:57:27 1999
@@ -1078,8 +1078,11 @@
chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), DEBUG_INTR);
if (wdcwait(chp, wdc_c->r_st_pmask, wdc_c->r_st_pmask,
(irq == 0) ? wdc_c->timeout : 0)) {
- if (irq && (xfer->c_flags & C_TIMEOU) == 0)
+ if (irq && (xfer->c_flags & C_TIMEOU) == 0) {
+ chp->ch_flags |= WDCF_IRQ_WAIT;
+ timeout(wdctimeout, chp, hz);
return 0; /* IRQ was not for us */
+ }
wdc_c->flags |= AT_TIMEOU;
__wdccommand_done(chp, xfer);
return 1;
---
INOUE, Yoshinari pf5y-inue@asahi-net.or.jp
>Audit-Trail:
>Unformatted: