Subject: IDE interfaces without pull-up resistors
To: None <tech-kern@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: tech-kern
Date: 06/09/2001 23:20:52
I've got two different IDE interfaces here that don't have pull-up
resistors on their data lines.  This means that reads from empty channels
return the last byte written to that channel (presumably through the
capacitance of the bus lines) rather than 0xff.  This causes wdcprobe() to
have to go through the full >31-second reset sequence before it can
determine that the channel is empty, which gets to be a pain when the
interface has three channels.

Would it be OK for wdcprobe() to have the same short-circuit for this case
as it has for the pull-up resistor case?  Something like:

Index: wdc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/wdc.c,v
retrieving revision 1.96
diff -u -p -r1.96 wdc.c
--- wdc.c	2001/04/25 17:53:35	1.96
+++ wdc.c	2001/06/09 22:17:24
@@ -200,9 +200,9 @@ wdcprobe(chp)
 		    chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe",
 		    chp->channel, st0, st1), DEBUG_PROBE);

-		if (st0 == 0xff)
+		if (st0 == 0xff || st0 == WDSD_IBM)
 			ret_value &= ~0x01;
-		if (st1 == 0xff)
+		if (st1 == 0xff || st1 == (WDSD_IBM | 0x10))
 			ret_value &= ~0x02;
 		if (ret_value == 0)
 			return 0;

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>