Subject: Re: umass superdisk quirks?
To: Lennart Augustsson <lennart@mail.augustsson.net>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 09/26/2000 22:00:50
--R3G7APHDIzY6R/pk
Content-Type: text/plain; charset=us-ascii

On Mon, Sep 25, 2000 at 06:18:54PM -0400, Lennart Augustsson wrote:
> Manuel, wizard of the scsipi code, is there a way to atapi_bus_probe() not
> probe both drives?

There's no way to do this for now but it's needed for some PCMCIA devices
too. I think the quirk should happen at the controller level, not drive
level (it's mostly a controller issue, as far as I can tell).
The attached patch adds a new controller cap, WDC_CAPABILITY_NOSLAVE, which 
the bus front-end can set when it finds a controller which is known to
only have a master drive (I guess this is true for most PCMCIA and USB
adapters).

--
Manuel Bouyer <bouyer@antioche.eu.org>
--

--R3G7APHDIzY6R/pk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.00446b"

--- wdc.c.orig	Tue Sep 26 21:49:27 2000
+++ wdc.c	Tue Sep 26 21:51:41 2000
@@ -203,7 +203,8 @@
 
 		if (st0 == 0xff)
 			ret_value &= ~0x01;
-		if (st1 == 0xff)
+		if (st1 == 0xff || (chp->wdc != NULL &&
+		    (chp->wdc->cap & WDC_CAPABILITY_NOSLAVE) != 0))
 			ret_value &= ~0x02;
 		if (ret_value == 0)
 			return 0;
--- wdcvar.h.orig	Tue Sep 26 21:48:30 2000
+++ wdcvar.h	Tue Sep 26 21:49:06 2000
@@ -99,6 +99,7 @@
 #define WDC_CAPABILITY_NO_EXTRA_RESETS 0x0100 /* only reset once */
 #define WDC_CAPABILITY_PREATA 0x0200 /* ctrl can be a pre-ata one */
 #define WDC_CAPABILITY_IRQACK 0x0400 /* callback to ack interrupt */
+#define WDC_CAPABILITY_NOSLAVE 0x0800 /* Don't probe for slave drives */
 	u_int8_t      PIO_cap; /* highest PIO mode supported */
 	u_int8_t      DMA_cap; /* highest DMA mode supported */
 	u_int8_t      UDMA_cap; /* highest UDMA mode supported */

--R3G7APHDIzY6R/pk--