From owner-freebsd-scsi Sat Jul 13 12:22:31 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA05547 for freebsd-scsi-outgoing; Sat, 13 Jul 1996 12:22:31 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA05542 for ; Sat, 13 Jul 1996 12:22:26 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id VAA07341; Sat, 13 Jul 1996 21:22:13 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA15592; Sat, 13 Jul 1996 21:22:13 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id VAA01719; Sat, 13 Jul 1996 21:14:25 +0200 (MET DST) From: J Wunsch Message-Id: <199607131914.VAA01719@uriah.heep.sax.de> Subject: Re: CD RRE To: freebsd-scsi@freebsd.org Date: Sat, 13 Jul 1996 21:14:25 +0200 (MET DST) Cc: robsch@robkaos.ruhr.de (Robert Schien) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from Robert Schien at "Jul 13, 96 06:46:22 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)