Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 1996 21:14:25 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-scsi@freebsd.org
Cc:        robsch@robkaos.ruhr.de (Robert Schien)
Subject:   Re: CD RRE
Message-ID:  <199607131914.VAA01719@uriah.heep.sax.de>
In-Reply-To: <m0uf7pm-0000ItC@robkaos.ruhr.de> from Robert Schien at "Jul 13, 96 06:46:22 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Robert Schien wrote:

> >   So 2.1.5
> > will ship with a worm driver that is functional but will probably only
> > work with Plasmon devices, since at least all the HP burners will be
> > assigned to the `cd' driver.
> 
> That's rather pity. I thought I could use my HP burner with 2.1.5-RELEASE
> when it will be out. : -(

Complain at HP.  It's not truely understandable why they claim their
device to be a CD-ROM.  (However, the SCSI-2 WORM devices have been
invented for something else than what they happen to be these days.)

I'm afraid more people will ask for this.  So without any guarantees,
this is the patch that would bring the ``SCSI type override'' code
into -stable/2.1.5 (pruned off any cosmetic changes):

Index: sys/scsi/scsiconf.c
===================================================================
RCS file: /home/ncvs/src/sys/scsi/scsiconf.c,v
retrieving revision 1.30.4.9
diff -u -u -r1.30.4.9 scsiconf.c
--- scsiconf.c	1996/06/28 16:59:47	1.30.4.9
+++ scsiconf.c	1996/07/13 19:09:43
@@ -150,6 +156,9 @@
  */
 struct scsidevs {
 	u_int32_t type;
+#ifdef NEW_SCSICONF
+	u_int32 driver;		/* normally the same as type */
+#endif
 	boolean removable;
 	char   *manufacturer;
 	char   *model;
@@ -166,11 +175,19 @@
 #define	SC_ONE_LU	0x00
 #define	SC_MORE_LUS	0x02
 
+#ifdef NEW_SCSICONF
+static struct scsidevs unknowndev =
+	{
+		T_UNKNOWN, T_UNKNOWN, 0, "*", "*", "*",
+		"uk", SC_MORE_LUS
+	};
+#else /* !NEW_SCSICONF */
 static struct scsidevs unknowndev =
 	{
 		T_UNKNOWN, 0, "*", "*", "*",
 		"uk", SC_MORE_LUS
 	};
+#endif /* NEW_SCSICONF */
 
 #ifdef NEW_SCSICONF
 static st_modes mode_tandberg3600 =
@@ -223,101 +240,103 @@
 /* od's must be probed before sd's since some of them identify as T_DIRECT */
 #if NOD > 0
         {
-		T_OPTICAL, T_REMOV, "MATSHITA", "PD-1 LF-1000", "*",
+		T_OPTICAL, T_OPTICAL, T_REMOV, "MATSHITA", "PD-1 LF-1000", "*",
 		"od", SC_MORE_LUS
 	},
-	/*
-	 * The SONY SMO is not really supported here, since it
-	 * identifies as T_DIRECT, and thus doesn't get assigned
-	 * to the od driver.
-	 * You need to upgrade to the FreeBSD 2.2 line for this.
-	 */
 	{
-		T_OPTICAL, T_REMOV, "SONY", "SMO-*", "*",
+		T_DIRECT, T_OPTICAL, T_REMOV, "SONY", "SMO-*", "*",
 		"od", SC_MORE_LUS
 	},
 	{
-		T_OPTICAL, T_REMOV, "*", "*", "*",
+		T_OPTICAL, T_OPTICAL, T_REMOV, "*", "*", "*",
 		"od", SC_ONE_LU
 	},
 #endif  /* NOD */
 #if NSD > 0
 	{
-		T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
+		T_DIRECT, T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
 		"mx1", SC_ONE_LU
 	},
 	{
-		T_DIRECT, T_FIXED, "EMULEX", "MD21*" , "*",
+		T_DIRECT, T_DIRECT, T_FIXED, "EMULEX", "MD21*" , "*",
 		"sd", SC_MORE_LUS
 	},
 	{
-		T_DIRECT, T_FIXED, "*", "*", "*",
+		T_DIRECT, T_DIRECT, T_FIXED, "*", "*", "*",
 		"sd", SC_ONE_LU
 	},
 #endif	/* NSD */
 #if NST > 0
 	{
-		T_SEQUENTIAL, T_REMOV, "TANDBERG", " TDC 3600", "*",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "TANDBERG", " TDC 3600", "*",
 		"st", SC_ONE_LU, ST_Q_NEEDS_PAGE_0, mode_tandberg3600
 	},
 	{
-		T_SEQUENTIAL, T_REMOV, "ARCHIVE", "VIPER 2525*", "-005",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "ARCHIVE", "VIPER 2525*", "-005",
 		"st", SC_ONE_LU, 0, mode_archive2525
 	},
 	{
-		T_SEQUENTIAL, T_REMOV, "ARCHIVE", "VIPER 150", "*",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "ARCHIVE", "VIPER 150", "*",
 		"st", SC_ONE_LU, ST_Q_NEEDS_PAGE_0, mode_archive150
 	},
 	{
-		T_SEQUENTIAL, T_REMOV, "WANGTEK", "5525ES*", "*",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "WANGTEK", "5525ES*", "*",
 		"st", SC_ONE_LU, 0, mode_wangtek5525
 	},
 	{
-		T_SEQUENTIAL, T_REMOV, "WangDAT", "Model 1300", "*",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "WangDAT", "Model 1300", "*",
 		"st", SC_ONE_LU, 0, mode_wangdat1300
 	},
 	{
-		T_SEQUENTIAL, T_REMOV, "*", "*", "*",
+		T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "*", "*", "*",
 		"st", SC_ONE_LU, 0, mode_unktape
 	},
 #endif	/* NST */
 #if NCH > 0
 	{
-		T_CHANGER, T_REMOV, "*", "*", "*",
+		T_CHANGER, T_CHANGER, T_REMOV, "*", "*", "*",
 		"ch", SC_ONE_LU
 	},
 #endif	/* NCH */
 #if NCD > 0
 #ifndef UKTEST	/* make cdroms unrecognised to test the uk driver */
 	{
-		T_READONLY, T_REMOV, "SONY",    "CD-ROM CDU-8012", "3.1a",
+		T_READONLY, T_READONLY, T_REMOV, "SONY",    "CD-ROM CDU-8012", "3.1a",
 		"cd", SC_ONE_LU
 	},
 	{
-		T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-600", "*",
+		T_READONLY, T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-600", "*",
 		"cd", SC_MORE_LUS
 	},
 	{
-		T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-602X" ,"*",
+		T_READONLY, T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-602X" ,"*",
 		"cd", SC_MORE_LUS
 	},
 	{
-		T_READONLY, T_REMOV, "NRC",	"MBR-7", "*",
+		T_READONLY, T_READONLY, T_REMOV, "NRC",	"MBR-7", "*",
 		"cd", SC_MORE_LUS
 	},
 	{
-		T_READONLY, T_REMOV, "CHINON",  "CD-ROM CDS-535","*",
+		T_READONLY, T_READONLY, T_REMOV, "CHINON",  "CD-ROM CDS-535","*",
 		"cd", SC_ONE_LU
 	},
 #endif /* !UKTEST */
 #endif	/* NCD */
 #if NWORM > 0
 	{
-		T_WORM, T_REMOV, "YAMAHA", "CDR100", "*",
+		T_WORM, T_WORM, T_REMOV, "YAMAHA", "CDR100", "*",
 		"worm", SC_ONE_LU
 	},
 	{
-		T_WORM, T_REMOV, "*", "*", "*",
+		T_READONLY, T_WORM, T_REMOV, "HP", "C4324/C4325", "*",
+		"worm", SC_ONE_LU
+	},
+	{
+		T_READONLY, T_WORM, T_REMOV, "PLASMON", "RF41*", "*",
+		"worm", SC_ONE_LU
+	},
+	{
+		T_WORM, T_WORM, T_REMOV, "*", "*", "*",
 		"worm", SC_ONE_LU
 	},
 #endif /* NWORM */
@@ -353,6 +372,16 @@
 		    ,"B5A ", "mx1", SC_ONE_LU
 	},
 #endif	/* NSD */
+#if NOD > 0
+	{
+		T_OPTICAL, T_REMOV, "standard", "any"
+		    ,"any", "od", SC_ONE_LU
+	},
+	{
+		T_OPTICAL, T_REMOV, "MATSHITA", "PD-1 LF-1000"
+		    ,"any", "od", SC_MORE_LUS
+	},
+#endif	/* NOD */
 #if NST > 0
 	{
 		T_SEQUENTIAL, T_REMOV, "standard", "any"
@@ -859,7 +891,7 @@
  * 2. Via the minor number.  That takes precedence over the config file.
  */
 static errval
-	scsi_attach_sctarg()
+scsi_attach_sctarg()
 {
 	struct scsi_link *sc_link = NULL;
 	int dev_unit;
@@ -1264,7 +1296,12 @@
 	if (bestmatch == &unknowndev)
 		*type_p = type;
 	else
-		*type_p = bestmatch->type;
+		*type_p =
+#ifdef NEW_SCSICONF
+			bestmatch->driver;
+#else
+			bestmatch->type;
+#endif
 
 	return bestmatch;
 }


-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607131914.VAA01719>