Jon Elson wrote:
> On 08/17/2016 01:07 PM, j...@cimmeri.com wrote:
> >   To my surprise, not all SCSI tape drives are created equal.
> Right, there was SCSI, SCSI-II and SCSI-III.  Also, a lot of 
> drives did not correctly support SOME features that others 
> did.  it got VERY messy.  Other drives had weird timing 
> restrictions, or certain commands must be given is a 
> specific order, or they caused an error or lack of response.

To wit, from NetBSD's "scsi" man page:

     Not every device obeys the SCSI specification as faithfully as it should.
     As such devices are discovered by the NetBSD Project, their names are
     added to a quirk list compiled into the scsi driver along a list of flags
     indicating which particular bad behaviors the device exhibits (and that
     the driver should be prepared to work around).

And in the "st" man page:
     Because different tape drives behave differently, there is a mechanism
     within the source to st to quickly and conveniently recognize and deal
     with brands and models of drive that have special requirements.

     There is a table (called the ``quirk table'') in which the identification
     strings of known errant drives can be stored.  Alongside each is a set of
     flags that allows the setting of densities and blocksizes for each of the
     modes, along with a set of `QUIRK' flags that can be used to enable or
     disable sections of code within the driver if a particular drive is rec-
     ognized.

And the list of currently defined quirk bits:

#define ST_Q_FORCE_BLKSIZE      0x0001
#define ST_Q_SENSE_HELP         0x0002  /* must do READ for good MODE SENSE */
#define ST_Q_IGNORE_LOADS       0x0004
#define ST_Q_BLKSIZE            0x0008  /* variable-block media_blksize > 0 */
#define ST_Q_UNIMODAL           0x0010  /* unimode drive rejects mode select */
#define ST_Q_NOPREVENT          0x0020  /* does not support PREVENT */
#define ST_Q_ERASE_NOIMM        0x0040  /* drive rejects ERASE/w Immed bit */
#define ST_Q_NOFILEMARKS        0x0080  /* can only write 0 filemarks */

Reply via email to