Subject: Re: Kern/25659 is not isolated to pcmcia attached drives.
To: Brian Buhrow <>
From: Steven M. Bellovin <>
List: tech-kern
Date: 04/22/2005 12:14:44
In message <>, Brian Buhrow wr
>	Hello.  Has anyone else noticed that the wdc.c timeouts seem to be
>short enough that attaching drives to NetBSD-2.x systems can be somewhat
>challenging?  Kern/25659 correctly identifies the problem as being in the
>sys/dev/ic/wdc.c file, but it doesn't look like any changes have been made
>to that file in the source trees which reflect the knowledge of this
>problem.  If anything, changes over the past year or so have caused most
>timeouts in this file to shorten considerably.  I've appended what I hope
>is a less hackish patch to this bug in the gnats database, and hope that
>someone with more knowledge than I could address the general problem.  The
>patch I appended makes things work quite well, but I'd be happy to engage
>in a discussion on this topic if it might result in a permanent fix which
>will live on in the sources.
>	Does anyone have any thoughts on this problem?  Am I the only one
>seeing it?

Per the original PR, I've only seen the problem with a PCMCIA drive.  I 
never committed the patch because there were objections -- it could 
effectively stall the system for ~30 seconds under certain 

My preference, though, is that my code should be incorporated, but with 
the wdc_delay_cnt variable initialized by default to 0 -- that will 
give the same timeout behavior as the current driver.  The right way to 
do it would involve timer interrupts to look for the results of various 
activities; I suspect that that would actually require a new kernel 
process to get it right, and I don't know that it's really worth it.

All that said, I no longer have access to the hardware that caused the 
trouble for me, so I can't test any fixes.

		--Prof. Steven M. Bellovin,