Subject: kern/22527: some hard disks needs more delay in sys/dev/ic/wdc.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <taca@kyoto.jone-system.com>
List: netbsd-bugs
Date: 08/18/2003 17:47:12
>Number:         22527
>Category:       kern
>Synopsis:       some hard disks needs more delay in sys/dev/ic/wdc.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 18 08:48:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Taca Takahiro Kambe
>Release:        NetBSD 1.6.1_STABLE
>Organization:
	
>Environment:
	
	
System: NetBSD 1.6.1_STABLE (SISBIC-TEST) #4: Fri Aug  8 14:07:12 JST 2003
	...
Architecture: i386
Machine: i386
>Description:
	SAMSUNG SP1203N 120GB hard disk couldn't be sometimes recognized by
	kernel even if BIOS and boot lorader recognized it.
>How-To-Repeat:
	SAMSUNG SP1203N 120GB hard disk has this problem 
	I can't test on another mother borad, but tested on some of the
	same model machine.
>Fix:
	Some hard disks needs more delay in sys/dev/ic/wdc.c.
	I don't know this is the right fix or not, but it seems to solve
	the problem.

Index: sys/dev/ic/wdc.c
===================================================================
RCS file: /usr/pkg/libdata/cvs/src/sys/dev/ic/wdc.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.1.2.1
diff -u -p -d -u -r1.1.1.3 -r1.1.1.1.2.1
--- sys/dev/ic/wdc.c	2003/03/31 05:04:53	1.1.1.3
+++ sys/dev/ic/wdc.c	2003/08/13 06:21:16	1.1.1.1.2.1
@@ -240,7 +240,7 @@ wdcprobe(chp)
 	delay(1000);
 	(void) bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error);
 	bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
-	delay(10);
+	delay(1000);
 
 	ret_value = __wdcwait_reset(chp, ret_value);
 	WDCDEBUG_PRINT(("%s:%d: after reset, ret_value=0x%d\n",



>Release-Note:
>Audit-Trail:
>Unformatted: