Subject: Re: MI SCSI driver and sync transfer for SCSI1 drives
To: None <tech-kern@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 11/19/2001 23:56:15
I asked:

> > Is it OK to remove periph_cap check for sync transfer
> > in scsipi_async_event_xfer_mode()?
> > Or is it better to add a new quirk value like PQUIRK_SYNC
> > for SCSI1 drives in scsiconf.c?

bouyer@antioche.eu.org wrote:

> I think it's better to add a new quirk for these "pseudo" SCSI1 devices.
> Some real SCSI1 device fail badly when a sync negotiation is initialed.

mjacob@feral.com wrote:

> The latter, I should think.

thorpej@wasabisystems.com wrote:

> Definitely a quirk -- the whole point of the periph_cap check is
> to avoid even asking a device to do something it can't do (which
> is "fatal" on many pre-SCSI2 devices).

Thanks for all your comments. I'll add a new quirk PQUIRK_CAP_SYNC
to scsiconf.c and scsipiconf.h.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

Index: scsiconf.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/scsipi/scsiconf.c,v
retrieving revision 1.168
diff -u -r1.168 scsiconf.c
--- scsiconf.c	2001/11/19 00:22:47	1.168
+++ scsiconf.c	2001/11/19 14:30:43
@@ -562,6 +562,8 @@
 	{{T_DIRECT, T_FIXED,
 	 "SEAGATE ", "ST19171",          ""},     PQUIRK_NOMODESENSE},
 	{{T_DIRECT, T_FIXED,
+	 "SEAGATE ", "ST32430N",         ""},     PQUIRK_CAP_SYNC},
+	{{T_DIRECT, T_FIXED,
 	 "SEAGATE ", "ST34501FC       ", ""},     PQUIRK_NOMODESENSE},
 	{{T_DIRECT, T_FIXED,
 	 "TOSHIBA ", "MK538FB         ", "6027"}, PQUIRK_NOLUNS},
@@ -837,6 +839,9 @@
 			periph->periph_cap |= PERIPH_CAP_SFTRESET;
 		if ((inqbuf.flags3 & SID_RelAdr) != 0)
 			periph->periph_cap |= PERIPH_CAP_RELADR;
+	} else {
+		if (quirks & PQUIRK_CAP_SYNC)
+			periph->periph_cap |= PERIPH_CAP_SYNC;
 	}
 
 	/*
Index: scsipiconf.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/scsipi/scsipiconf.h,v
retrieving revision 1.63
diff -u -r1.63 scsipiconf.h
--- scsipiconf.h	2001/11/18 17:22:43	1.63
+++ scsipiconf.h	2001/11/19 14:30:44
@@ -448,6 +448,7 @@
 #define PQUIRK_NO_FLEX_PAGE	0x00020000	/* does not support flex geom
 						   page */
 #define PQUIRK_NOBIGMODESENSE	0x00040000	/* has no big mode-sense op */
+#define PQUIRK_CAP_SYNC		0x00080000	/* SCSI1 device with sync op */
 
 
 /*