Subject: Re: port-i386/26910: 2.0_BETA hangs after a UDMA failure/downgrade
To: Tyler M Mitchell <fission@styrophone.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 09/11/2004 19:35:27
--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sat, Sep 11, 2004 at 02:33:00AM -0700, Tyler M Mitchell wrote:
> [...]
> isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
> npx0 at isa0 port 0xf0-0xff: using exception 16
> isapnp0: no ISA Plug 'n Play devices found
> biomask e565 netmask ed65 ttymask fde7
> Kernelized RAIDframe activated
> wd0: transfer error, downgrading to Ultra-DMA mode 2
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
> cd0(pciide0:0:1): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> wd0d: error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> wd0: (aborted command, interface CRC error)
> 
> 	===> At this point, it would freeze in 2.0_BETA.
> 	===> In 1.6.2 it continues after downgrading.

Hi,
please try the attached patch. If fixes the problem on my testbed.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
retrieving revision 1.172.2.5
diff -u -r1.172.2.5 wdc.c
--- wdc.c	11 Aug 2004 19:43:58 -0000	1.172.2.5
+++ wdc.c	11 Sep 2004 17:33:59 -0000
@@ -995,6 +995,7 @@
 	if ((flags & AT_POLL) == 0) {
 		if (chp->ch_flags & WDCF_TH_RESET) {
 			/* no need to schedule a reset more than one time */
+			chp->ch_queue->queue_freeze--;
 			return;
 		}
 		chp->ch_flags |= WDCF_TH_RESET;

--KsGdsel6WgEHnImy--