diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 44be2bc38d81..fdc0efb0facb 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.50 1996/02/02 22:57:27 joerg Exp $ + * $Id: scsiconf.c,v 1.51 1996/02/02 22:59:47 joerg Exp $ */ #include @@ -191,6 +191,13 @@ static st_modes mode_tandberg3600 = {0, 0, QIC_150}, /* minor 8,9,10,11 */ {0, 0, QIC_120} /* minor 12,13,14,15 */ }; +static st_modes mode_tandberg4200 = + { + {0, 0, 0}, /* minor 0,1,2,3 */ + {0, ST_Q_FORCE_VAR_MODE, 0}, /* minor 4,5,6,7 */ + {0, 0, QIC_150}, /* minor 8,9,10,11 */ + {0, 0, QIC_120} /* minor 12,13,14,15 */ + }; static st_modes mode_archive2525 = { {0, ST_Q_SNS_HLP, 0}, /* minor 0,1,2,3 */ @@ -259,6 +266,10 @@ static struct scsidevs knowndevs[] = T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "TANDBERG", " TDC 3600", "*", "st", SC_ONE_LU, ST_Q_NEEDS_PAGE_0, mode_tandberg3600 }, + { + T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "TANDBERG", " TDC 42*", "*", + "st", SC_ONE_LU, ST_Q_SNS_HLP|ST_Q_NO_1024, mode_tandberg4200 + }, { T_SEQUENTIAL, T_SEQUENTIAL, T_REMOV, "ARCHIVE", "VIPER 2525*", "-005", "st", SC_ONE_LU, 0, mode_archive2525 diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index a717ccc1bdb8..a21450f0922a 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.37 1996/01/07 19:27:06 gibbs Exp $ + * $Id: scsiconf.h,v 1.38 1996/01/20 15:05:53 joerg Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -257,6 +257,7 @@ typedef struct st_mode st_modes[4]; #define ST_Q_IGNORE_LOADS 0x0010 #define ST_Q_BLKSIZ 0x0020 /* variable-block media_blksiz > 0 */ #define ST_Q_CC_NOMSG 0x0040 /* no messages accepted in CC state */ +#define ST_Q_NO_1024 0x0080 /* never ever use 1024-byte fix blk */ #define ST_Q_NO_SYNC SCSI_Q_NO_SYNC #define ST_Q_NO_FAST SCSI_Q_NO_FAST diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 2c204cfdbe2b..ac616d768429 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.58 1996/01/14 16:29:01 joerg Exp $ + * $Id: st.c,v 1.59 1996/01/29 03:19:23 gibbs Exp $ */ /* @@ -757,6 +757,9 @@ st_decide_mode(unit, first_read) case HALFINCH_1600: case HALFINCH_6250: case DDS: + case QIC_525: + case QIC_1320: + case QIC_3080: st->flags &= ~ST_FIXEDBLOCKS; st->blksiz = 0; SC_DEBUG(sc_link, SDEV_DB3, ("density specified variable\n")); @@ -765,9 +768,6 @@ st_decide_mode(unit, first_read) case QIC_24: case QIC_120: case QIC_150: - case QIC_525: - case QIC_1320: - case QIC_3080: st->flags |= ST_FIXEDBLOCKS; if (st->media_blksiz > 0) { st->blksiz = st->media_blksiz; @@ -1993,7 +1993,7 @@ st_touch_tape(unit) if (( errno = st_mode_sense(unit, 0, NULL, 0, 0)) ) { goto bad; } - st->blksiz = 1024; + st->blksiz = (st->quirks & ST_Q_NO_1024)? 512: 1024; do { switch ((int)st->blksiz) { case 512: