summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-02-03 13:31:13 +0000
committerjoerg <joerg@FreeBSD.org>1996-02-03 13:31:13 +0000
commit660a4cf0c0f7f298b2e2980b86664c8ba12d5f72 (patch)
tree9c6805fe66b2789cb90320a238db984fe19f84f3 /sys/scsi
parentaa3af1501b53b625f3ccabddc6a4cc7fd409b7fe (diff)
downloadFreeBSD-src-660a4cf0c0f7f298b2e2980b86664c8ba12d5f72.zip
FreeBSD-src-660a4cf0c0f7f298b2e2980b86664c8ba12d5f72.tar.gz
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.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.c13
-rw-r--r--sys/scsi/scsiconf.h3
-rw-r--r--sys/scsi/st.c10
3 files changed, 19 insertions, 7 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 44be2bc..fdc0efb 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 <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 */
@@ -260,6 +267,10 @@ static struct scsidevs knowndevs[] =
"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 a717ccc..a21450f 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 2c204cf..ac616d7 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:
OpenPOWER on IntegriCloud