Add a quirk record for the Tandberg 42XX series. Not only that these

drives require ST_Q_SNS_HLP, they also wrongly accept a blocksize of
1024 in the first place (for a QIC-150 cartridge), but complain later
about it.  The hack is to only probe for 512 for them.

Reorder the entries in st_decide_mode() so that QIC >= 525 is properly
accepted as variable blocksize.
This commit is contained in:
Joerg Wunsch 1996-02-03 13:31:13 +00:00
parent 0f9a535124
commit c38a76a7d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13883
3 changed files with 19 additions and 7 deletions

View File

@ -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 <sys/types.h>
@ -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

View File

@ -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

View File

@ -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: