summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/scsi/cd.c8
-rw-r--r--sys/scsi/scsi_tape.h68
-rw-r--r--sys/scsi/scsiconf.c167
-rw-r--r--sys/scsi/scsiconf.h11
-rw-r--r--sys/scsi/st.c190
5 files changed, 21 insertions, 423 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 6e79c6d..0db6bb4 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.48 1995/12/08 11:18:38 julian Exp $
+ * $Id: cd.c,v 1.49 1995/12/08 23:22:17 phk Exp $
*/
#define SPLCD splbio
@@ -224,7 +224,11 @@ cdattach(struct scsi_link *sc_link)
* the command can get the sense back so that it can selectively log
* errors.
*/
- cd_get_parms(unit, SCSI_NOSLEEP | SCSI_NOMASK);
+ if (sc_link->quirks & CD_Q_NO_TOUCH) {
+ dp->disksize = 0;
+ } else {
+ cd_get_parms(unit, SCSI_NOSLEEP | SCSI_NOMASK);
+ }
if (dp->disksize) {
printf("cd present [%ld x %ld byte records]",
cd->params.disksize,
diff --git a/sys/scsi/scsi_tape.h b/sys/scsi/scsi_tape.h
index 6512dbf..04d9b03 100644
--- a/sys/scsi/scsi_tape.h
+++ b/sys/scsi/scsi_tape.h
@@ -21,7 +21,7 @@
/*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsi_tape.h,v 1.14 1995/11/30 07:43:46 pst Exp $
+ * $Id: scsi_tape.h,v 1.15 1995/12/09 20:42:32 phk Exp $
*/
#ifndef SCSI_SCSI_TAPE_H
#define SCSI_SCSI_TAPE_H 1
@@ -244,70 +244,4 @@ struct tape_pages
};
-
-
-#ifndef NEW_SCSICONF
-/**********************************************************************
- from the scsi2 spec
- Value Tracks Density(bpi) Code Type Reference Note
- 0x1 9 800 NRZI R X3.22-1983 2
- 0x2 9 1600 PE R X3.39-1986 2
- 0x3 9 6250 GCR R X3.54-1986 2
- 0x5 4/9 8000 GCR C X3.136-1986 1
- 0x6 9 3200 PE R X3.157-1987 2
- 0x7 4 6400 IMFM C X3.116-1986 1
- 0x8 4 8000 GCR CS X3.158-1986 1
- 0x9 18 37871 GCR C X3B5/87-099 2
- 0xA 22 6667 MFM C X3B5/86-199 1
- 0xB 4 1600 PE C X3.56-1986 1
- 0xC 24 12690 GCR C HI-TC1 1,5
- 0xD 24 25380 GCR C HI-TC2 1,5
- 0xF 15 10000 GCR C QIC-120 1,5
- 0x10 18 10000 GCR C QIC-150 1,5
- 0x11 26 16000 GCR C QIC-320(525?) 1,5
- 0x12 30 51667 RLL C QIC-1350 1,5
- 0x13 1 61000 DDS CS X3B5/88-185A 4
- 0x14 1 43245 RLL CS X3.202-1991 4
- 0x15 1 45434 RLL CS ECMA TC17 4
- 0x16 48 10000 MFM C X3.193-1990 1
- 0x17 48 42500 MFM C X3B5/91-174 1
-
- where Code means:
- NRZI Non Return to Zero, change on ones
- GCR Group Code Recording
- PE Phase Encoded
- IMFM Inverted Modified Frequency Modulation
- MFM Modified Frequency Modulation
- DDS Dat Data Storage
- RLL Run Length Encoding
-
- where Type means:
- R Real-to-Real
- C Cartridge
- CS cassette
-
- where Notes means:
- 1 Serial Recorded
- 2 Parallel Recorded
- 3 Old format know as QIC-11
- 4 Helical Scan
- 5 Not ANSI standard, rather industry standard.
-
-********************************************************************/
-
-#define HALFINCH_800 0x01
-#define HALFINCH_1600 0x02
-#define HALFINCH_6250 0x03
-#define QIC_11 0x04 /* from Archive 150S Theory of Op. XXX */
-#define QIC_24 0x05 /* may be bad, works for CIPHER ST150S XXX */
-#define QIC_120 0x0f
-#define QIC_150 0x10
-#define QIC_320 0x11
-#define QIC_525 0x11
-#define QIC_1320 0x12
-#define DDS 0x13
-#define DAT_1 0x13
-#define QIC_3080 0x29
-#endif /* NEW_SCSICONF */
-
#endif /*SCSI_SCSI_TAPE_H*/
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 220811b..78e70eb 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.37 1995/11/20 12:42:29 phk Exp $
+ * $Id: scsiconf.c,v 1.38 1995/11/21 15:14:28 bde Exp $
*/
#include <sys/types.h>
@@ -57,7 +57,8 @@ extern void *extend_set __P((struct extend_array *ea, int index, void *value));
*/
extern struct scsi_device uk_switch;
-/* Extensible arrays: Use a realloc like implementation to permit
+/***********************************************************************
+ * Extensible arrays: Use a realloc like implementation to permit
* the arrays to be extend. These are set up to be moved out
* of this file if needed elsewhere.
*/
@@ -145,7 +146,7 @@ extend_release(struct extend_array *ea, int index)
}
}
-/*
+/***********************************************************************
* This extend_array holds an array of "scsibus_data" pointers.
* One of these is allocated and filled in for each scsi bus.
* it holds pointers to allow the scsi bus to get to the driver
@@ -162,40 +163,26 @@ struct extend_array *scbusses;
*/
struct scsidevs {
u_int32 type;
-#ifdef NEW_SCSICONF
u_int32 driver; /* normally the same as type */
-#endif
boolean removable;
char *manufacturer;
char *model;
char *version;
char *devname;
char flags; /* 1 show my comparisons during boot(debug) */
-#ifdef NEW_SCSICONF
u_int16 quirks;
void *devmodes;
-#endif
};
#define SC_SHOWME 0x01
#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 =
{
{0, 0, 0}, /* minor 0,1,2,3 */
@@ -238,10 +225,8 @@ static st_modes mode_unktape =
{0, ST_Q_FORCE_VAR_MODE, HALFINCH_1600}, /* minor 8,9,10,11 */
{0, ST_Q_FORCE_VAR_MODE, HALFINCH_6250} /* minor 12,13,14,15 */
};
-#endif /* NEW_SCSICONF */
static struct scsidevs knowndevs[] =
-#ifdef NEW_SCSICONF
{
/* od's must be probed before sd's since some of them identify as T_DIRECT */
#if NOD > 0
@@ -260,10 +245,6 @@ static struct scsidevs knowndevs[] =
#endif /* NOD */
#if NSD > 0
{
- T_DIRECT, T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
- "mx1", SC_ONE_LU
- },
- {
T_DIRECT, T_DIRECT, T_FIXED, "*", "*", "*",
"sd", SC_ONE_LU
},
@@ -307,12 +288,8 @@ static struct scsidevs knowndevs[] =
"cd", SC_ONE_LU
},
{
- T_READONLY, T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-600", "*",
- "cd", SC_MORE_LUS
- },
- {
- T_READONLY, T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-602X" ,"*",
- "cd", SC_MORE_LUS
+ T_READONLY, T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-6??*" ,"*",
+ "cd", SC_MORE_LUS, CD_Q_NO_TOUCH
},
{
T_READONLY, T_READONLY, T_REMOV, "CHINON", "CD-ROM CDS-535","*",
@@ -334,71 +311,6 @@ static struct scsidevs knowndevs[] =
0
}
};
-#else /* !NEW_SCSICONF */
-{
-#if NSD > 0
- {
- T_DIRECT, T_FIXED, "standard", "any"
- ,"any", "sd", SC_ONE_LU
- },
- {
- T_DIRECT, T_FIXED, "MAXTOR ", "XT-4170S "
- ,"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"
- ,"any", "st", SC_ONE_LU
- },
-#endif /* NST */
-#if NCH > 0
- {
- T_CHANGER, T_REMOV, "standard", "any"
- ,"any", "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", "cd", SC_ONE_LU
- },
- {
- T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-600"
- ,"any", "cd", SC_MORE_LUS
- },
- {
- T_READONLY, T_REMOV, "PIONEER", "CD-ROM DRM-602X"
- ,"any", "cd", SC_MORE_LUS
- },
- {
- T_READONLY, T_REMOV, "CHINON", "CD-ROM CDS-535"
- ,"any", "cd", SC_ONE_LU
- },
-#endif /* !UKTEST */
-#endif /* NCD */
-#if NWORM > 0
- {
- T_WORM, T_REMOV, "YAMAHA", "CDR100"
- ,"any", "worm", SC_ONE_LU
- },
-#endif /* NWORM */
- {
- 0
- }
-};
-#endif /* NEW_SCSICONF */
/*
* Declarations
@@ -1031,7 +943,6 @@ scsi_probe_bus(int bus, int targ, int lun)
sc_link->lun = lun;
sc_link->quirks = 0;
bestmatch = scsi_probedev(sc_link, &maybe_more, &type);
-#ifdef NEW_SCSICONF
if (bestmatch) {
sc_link->quirks = bestmatch->quirks;
sc_link->devmodes = bestmatch->devmodes;
@@ -1039,7 +950,6 @@ scsi_probe_bus(int bus, int targ, int lun)
sc_link->quirks = 0;
sc_link->devmodes = NULL;
}
-#endif
if (bestmatch) { /* FOUND */
sc_link->device = scsi_device_lookup(type);
@@ -1273,12 +1183,7 @@ scsi_probedev(sc_link, maybe_more, type_p)
*type_p = type;
else
*type_p =
-#ifdef NEW_SCSICONF
bestmatch->driver;
-#else
- bestmatch->type;
-#endif
-
return bestmatch;
}
@@ -1302,7 +1207,6 @@ scsi_dev_lookup(d_open)
return d;
}
-#ifdef NEW_SCSICONF
/*
* Compare name with pattern, return 0 on match.
* Short pattern matches trailing blanks in name,
@@ -1317,6 +1221,7 @@ match(pattern, name)
while (c = *pattern++)
{
if (c == '*') return 0;
+ if ((c == '?') && (*name > ' ')) continue;
if (c != *name++) return 1;
}
while (c = *name++)
@@ -1325,7 +1230,6 @@ match(pattern, name)
}
return 0;
}
-#endif
/*
* Try make as good a match as possible with
@@ -1337,7 +1241,6 @@ scsi_selectdev(qualifier, type, remov, manu, model, rev)
boolean remov;
char *manu, *model, *rev;
{
-#ifdef NEW_SCSICONF
struct scsidevs *bestmatch = NULL;
struct scsidevs *thisentry;
@@ -1370,62 +1273,6 @@ scsi_selectdev(qualifier, type, remov, manu, model, rev)
bestmatch = thisentry;
break;
}
-#else
- u_int32 numents = (sizeof(knowndevs) / sizeof(struct scsidevs)) - 1;
- u_int32 count = 0;
- u_int32 bestmatches = 0;
- struct scsidevs *bestmatch = (struct scsidevs *) 0;
- struct scsidevs *thisentry = knowndevs;
-
- type |= qualifier; /* why? */
-
- thisentry--;
- while (count++ < numents) {
- thisentry++;
- if (type != thisentry->type) {
- continue;
- }
- if (bestmatches < 1) {
- bestmatches = 1;
- bestmatch = thisentry;
- }
- if (remov != thisentry->removable) {
- continue;
- }
- if (bestmatches < 2) {
- bestmatches = 2;
- bestmatch = thisentry;
- }
- if (thisentry->flags & SC_SHOWME)
- printf("'%s'-'%s'\n", thisentry->manufacturer, manu);
- if (strcmp(thisentry->manufacturer, manu)) {
- continue;
- }
- if (bestmatches < 3) {
- bestmatches = 3;
- bestmatch = thisentry;
- }
- if (thisentry->flags & SC_SHOWME)
- printf("'%s'-'%s'\n", thisentry->model, model);
- if (strcmp(thisentry->model, model)) {
- continue;
- }
- if (bestmatches < 4) {
- bestmatches = 4;
- bestmatch = thisentry;
- }
- if (thisentry->flags & SC_SHOWME)
- printf("'%s'-'%s'\n", thisentry->version, rev);
- if (strcmp(thisentry->version, rev)) {
- continue;
- }
- if (bestmatches < 5) {
- bestmatches = 5;
- bestmatch = thisentry;
- break;
- }
- }
-#endif /* NEW_SCSICONF */
if (bestmatch == (struct scsidevs *) 0) {
bestmatch = &unknowndev;
}
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index e637a53..cfa53a7 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsiconf.h,v 1.31 1995/11/21 12:55:01 bde Exp $
+ * $Id: scsiconf.h,v 1.32 1995/12/05 07:14:25 julian Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@@ -232,7 +232,6 @@ extern struct scsi_device_config scsi_dinit[];
#endif
-#ifdef NEW_SCSICONF
/*
* Define various devices that we know mis-behave in some way,
* and note how they are bad, so we can correct for them
@@ -272,7 +271,9 @@ typedef struct st_mode st_modes[4];
#define SD_Q_NO_FAST SCSI_Q_NO_FAST
#define SD_Q_NO_WIDE SCSI_Q_NO_WIDE
-#endif
+/* cd specific CD_Q_* */
+#define CD_Q_NO_TOUCH 0x0001
+
/*
* This structure describes the connection between an adapter driver and
@@ -487,7 +488,6 @@ void ukinit __P((void));
#define SCSI_EXTERNALLEN (sizeof(struct scsi_link))
-#ifdef NEW_SCSICONF
/* XXX This belongs in a tape file.
*/
@@ -552,7 +552,8 @@ void ukinit __P((void));
#define QIC_1320 0x12
#define DDS 0x13
#define DAT_1 0x13
-#endif /* NEW_SCSICONF */
+#define QIC_3080 0x29
+
/* XXX (dufault@hda.com) This is used only by "su" and "sctarg".
* The minor number field conflicts with the disk slice code,
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 521d907..a212b0a 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: st.c,v 1.51 1995/12/09 20:42:38 phk Exp $
+ * $Id: st.c,v 1.52 1995/12/10 01:47:34 bde Exp $
*/
/*
@@ -68,94 +68,6 @@
#define SCSI_2_MAX_DENSITY_CODE 0x17 /* maximum density code specified
* in SCSI II spec. */
-#ifndef NEW_SCSICONF
-/*
- * Define various devices that we know mis-behave in some way,
- * and note how they are bad, so we can correct for them
- */
-struct modes {
- u_int32 blksiz;
- u_int32 quirks; /* same definitions as in rogues */
- char density;
- char spare[3];
-};
-
-struct rogues {
- char *name;
- char *manu;
- char *model;
- char *version;
- u_int32 quirks; /* valid for all modes */
- struct modes modes[4];
-};
-
-/* define behaviour codes (quirks) */
-#define ST_Q_NEEDS_PAGE_0 0x00001
-#define ST_Q_FORCE_FIXED_MODE 0x00002
-#define ST_Q_FORCE_VAR_MODE 0x00004
-#define ST_Q_SNS_HLP 0x00008 /* must do READ for good MODE SENSE */
-#define ST_Q_IGNORE_LOADS 0x00010
-#define ST_Q_BLKSIZ 0x00020 /* variable-block media_blksiz > 0 */
-
-static struct rogues gallery[] = /* ends with an all-null entry */
-{
- {"Such an old device ", "pre-scsi", " unknown model ", "????",
- 0,
- {
- {512, ST_Q_FORCE_FIXED_MODE, 0}, /* minor 0,1,2,3 */
- {512, ST_Q_FORCE_FIXED_MODE, QIC_24}, /* minor 4,5,6,7 */
- {0, ST_Q_FORCE_VAR_MODE, HALFINCH_1600}, /* minor 8,9,10,11 */
- {0, ST_Q_FORCE_VAR_MODE, HALFINCH_6250} /* minor 12,13,14,15 */
- }
- },
- {"Tandberg tdc3600", "TANDBERG", " TDC 3600", "????",
- ST_Q_NEEDS_PAGE_0,
- {
- {0, 0, 0}, /* minor 0,1,2,3 */
- {0, ST_Q_FORCE_VAR_MODE, QIC_525}, /* minor 4,5,6,7 */
- {0, 0, QIC_150}, /* minor 8,9,10,11 */
- {0, 0, QIC_120} /* minor 12,13,14,15 */
- }
- },
- {"Rev 5 of the Archive 2525", "ARCHIVE ", "VIPER 2525 25462", "-005",
- 0,
- {
- {0, ST_Q_SNS_HLP, 0}, /* minor 0,1,2,3 */
- {0, ST_Q_SNS_HLP, QIC_525}, /* minor 4,5,6,7 */
- {0, 0, QIC_150}, /* minor 8,9,10,11 */
- {0, 0, QIC_120} /* minor 12,13,14,15 */
- }
- },
- {"Archive Viper 150", "ARCHIVE ", "VIPER 150", "????",
- ST_Q_NEEDS_PAGE_0,
- {
- {0, 0, 0}, /* minor 0,1,2,3 */
- {0, 0, QIC_150}, /* minor 4,5,6,7 */
- {0, 0, QIC_120}, /* minor 8,9,10,11 */
- {0, 0, QIC_24} /* minor 12,13,14,15 */
- }
- },
- {"Wangtek 5525ES", "WANGTEK ", "5525ES SCSI REV7", "????",
- 0,
- {
- {0, 0, 0}, /* minor 0,1,2,3 */
- {0, ST_Q_BLKSIZ, QIC_525}, /* minor 4,5,6,7 */
- {0, 0, QIC_150}, /* minor 8,9,10,11 */
- {0, 0, QIC_120} /* minor 12,13,14,15 */
- }
- },
- {"WangDAT model 1300", "WangDAT ", "Model 1300", "????",
- 0,
- {
- {0, 0, 0}, /* minor 0,1,2,3 */
- {512, ST_Q_FORCE_FIXED_MODE, 0x13}, /* minor 4,5,6,7 */
- {1024, ST_Q_FORCE_FIXED_MODE, 0x13}, /* minor 8,9,10,11 */
- {0, ST_Q_FORCE_VAR_MODE, 0x13} /* minor 12,13,14,15 */
- }
- },
- {(char *) 0}
-};
-#endif /* NEW_SCSICONF */
static errval st_space __P((u_int32 unit, int32 number, u_int32 what, u_int32 flags));
static errval st_rewind __P((u_int32 unit, boolean immed, u_int32 flags));
@@ -178,9 +90,6 @@ static void ststart(u_int32 unit, u_int32 flags);
static void st_unmount __P((int unit, boolean eject));
static errval st_mount_tape __P((dev_t dev, u_int32 flags));
static void st_loadquirks __P((struct scsi_link *sc_link));
-#ifndef NEW_SCSICONF
-static void st_identify_drive __P((u_int32 unit));
-#endif
static errval st_interpret_sense __P((struct scsi_xfer *xs));
#define ESUCCESS 0
@@ -198,9 +107,6 @@ struct scsi_data {
/*--------------------parameters reported by the device ----------------------*/
u_int32 blkmin; /* min blk size */
u_int32 blkmax; /* max blk size */
-#ifndef NEW_SCSICONF
- struct rogues *rogues; /* if we have a rogue entry */
-#endif
/*--------------------parameters reported by the device for this media--------*/
u_int32 numblks; /* nominal blocks capacity */
u_int32 media_blksiz; /* 0 if not ST_FIXEDBLOCKS */
@@ -208,11 +114,7 @@ struct scsi_data {
/*--------------------quirks for the whole drive------------------------------*/
u_int32 drive_quirks; /* quirks of this drive */
/*--------------------How we should set up when openning each minor device----*/
-#ifdef NEW_SCSICONF
st_modes modes; /* plus more for each mode */
-#else
- struct modes modes[4]; /* plus more for each mode */
-#endif
u_int8 modeflags[4]; /* flags for the modes */
#define DENSITY_SET_BY_USER 0x01
#define DENSITY_SET_BY_QUIRK 0x02
@@ -381,11 +283,7 @@ stattach(struct scsi_link *sc_link)
* Check if the drive is a known criminal and take
* Any steps needed to bring it into line
*/
-#ifdef NEW_SCSICONF
st_loadquirks(sc_link);
-#else
- st_identify_drive(unit);
-#endif
/*
* Use the subdriver to request information regarding
* the drive. We cannot use interrupts yet, so the
@@ -491,83 +389,6 @@ stattach(struct scsi_link *sc_link)
return 0;
}
-#ifndef NEW_SCSICONF
-/*
- * Use the inquiry routine in 'scsi_base' to get drive info so we can
- * Further tailor our behaviour.
- */
-static void
-st_identify_drive(unit)
- u_int32 unit;
-{
- struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
- struct scsi_data *st = sc_link->sd;
- struct rogues *finger;
- char manu[32];
- char model[32];
- char model2[32];
- char version[32];
- u_int32 model_len;
- struct scsi_inquiry_data *inqbuf = &sc_link->inqbuf;
-
- /*
- * Get the device type information
- */
- if (scsi_inquire(sc_link, inqbuf,
- SCSI_NOSLEEP | SCSI_NOMASK | SCSI_SILENT) != 0) {
- printf("st%ld: couldn't get device type, using default\n", unit);
- return;
- }
- if ((inqbuf->version & SID_ANSII) == 0) {
- /*
- * If not advanced enough, use default values
- */
- strncpy(manu, "pre-scsi", 8);
- manu[8] = 0;
- strncpy(model, " unknown model ", 16);
- model[16] = 0;
- strncpy(version, "????", 4);
- version[4] = 0;
- } else {
- strncpy(manu, inqbuf->vendor, 8);
- manu[8] = 0;
- strncpy(model, inqbuf->product, 16);
- model[16] = 0;
- strncpy(version, inqbuf->revision, 4);
- version[4] = 0;
- }
-
- /*
- * Load the parameters for this kind of device, so we
- * treat it as appropriate for each operating mode.
- * Only check the number of characters in the array's
- * model entry, not the entire model string returned.
- */
- finger = gallery;
- while (finger->name) {
- model_len = 0;
- while (finger->model[model_len] && (model_len < 32)) {
- model2[model_len] = model[model_len];
- model_len++;
- }
- model2[model_len] = 0;
- if ((strcmp(manu, finger->manu) == 0)
- && (strcmp(model2, finger->model) == 0 ||
- strcmp("????????????????", finger->model) == 0)
- && (strcmp(version, finger->version) == 0 ||
- strcmp("????", finger->version) == 0)) {
- printf("st%ld: %s is a known rogue\n", unit, finger->name);
- st->rogues = finger;
- st->drive_quirks = finger->quirks;
- st->quirks = finger->quirks; /*start value */
- st_loadquirks(sc_link);
- break;
- } else {
- finger++; /* go to next suspect */
- }
- }
-}
-#endif /* NEW_SCSICONF */
/*
* initialise the subdevices to the default (QUIRK) state.
@@ -580,7 +401,6 @@ st_loadquirks(sc_link)
{
struct scsi_data *st = sc_link->sd;
int i;
-#ifdef NEW_SCSICONF
struct st_mode *mode;
struct st_mode *mode2;
@@ -590,14 +410,6 @@ st_loadquirks(sc_link)
st->quirks = st->drive_quirks = sc_link->quirks;
-#else
- struct modes *mode;
- struct modes *mode2;
-
- if (!st->rogues)
- return;
- mode = st->rogues->modes;
-#endif
mode2 = st->modes;
for (i = 0; i < 4; i++) {
OpenPOWER on IntegriCloud