*BSD News Article 81160


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!hunter.premier.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: scsi tape recommendations
Date: 20 Oct 1996 14:21:49 GMT
Organization: Private BSD site, Dresden
Lines: 50
Message-ID: <54dcht$3gs@uriah.heep.sax.de>
References: <29f_9610110039@caamora.caamora.com.au>
  <53o3mo$8p4@uriah.heep.sax.de> <333_9610162328@caamora.caamora.com.au>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
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

jlm@caamora.caamora.com.au (jlm) wrote:

>  ju> I think a simple quirk record would have done it for FreeBSD, too.
> 
> sounds good, but what is a quirk (record) ?

A note for a SCSI `type' (i.e. high-level) driver about exceptional
handling required (from what the driver believes to be standard) for
some particular device.

Here's part of my patch again:

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 */
       };

That's a record describing the various tape subdevices.  It basically
says that subdevice 0 (/dev/rst0.0 alias /dev/rst0) uses the defaults,
while subdevice 1 (/dev/rst0.1) always forces variable blocklength
mode, and subdevices 2 and 3 hard-wire QIC-150 and QIC-120 density,
respectively.  (The latter two should probably also contain
ST_Q_FORCE_FIXED_MODE instead of the second zero.)

       {
               T_SEQUENTIAL, T_REMOV, "TANDBERG", " TDC 38*", "*",
               "st", SC_ONE_LU, ST_Q_SNS_HLP|ST_Q_NO_1024, mode_tandberg4200
       },

This means all devices that are of type `sequential access' (aka. tape)
with removable media, and that probe as "TANDBERG TDC 38<something>"
will use the following quirks:

. they will only be probed on a single LUN (they are known to be not
  multi-LUN devices),
. they require ``sense help'', i.e. at least one block must pass the
  tape head before the MODE SENSE data are useful for the driver,
. they are known to not handle 1024-byte fixed-length records, and
. the record named `mode_tandberg4200' should be used to describe the
  subdevices, as opposed to the generic subdevice mode.

-- 
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. ;-)