linux/drivers/scsi/st.h

/* SPDX-License-Identifier: GPL-2.0 */

#ifndef _ST_H
#define _ST_H

#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/kref.h>
#include <scsi/scsi_cmnd.h>

/* Descriptor for analyzed sense data */
struct st_cmdstatus {};

struct scsi_tape;

/* scsi tape command */
struct st_request {};

/* The tape buffer descriptor. */
struct st_buffer {};

/* The tape mode definition */
struct st_modedef {};

/* Number of modes can be changed by changing ST_NBR_MODE_BITS. The maximum
   number of modes is 16 (ST_NBR_MODE_BITS 4) */
#define ST_NBR_MODE_BITS
#define ST_NBR_MODES
#define ST_MODE_SHIFT
#define ST_MODE_MASK

#define ST_MAX_TAPES
#define ST_MAX_TAPE_ENTRIES

/* The status related to each partition */
struct st_partstat {};

/* Tape statistics */
struct scsi_tape_stats {};

#define ST_NBR_PARTITIONS

/* The tape drive descriptor */
struct scsi_tape {};

/* Bit masks for use_pf */
#define USE_PF
#define PF_TESTED

/* Values of eof */
#define ST_NOEOF
#define ST_FM_HIT
#define ST_FM
#define ST_EOM_OK
#define ST_EOM_ERROR
#define ST_EOD_1
#define ST_EOD_2
#define ST_EOD
/* EOD hit while reading => ST_EOD_1 => return zero => ST_EOD_2 =>
   return zero => ST_EOD, return ENOSPC */
/* When writing: ST_EOM_OK == early warning found, write OK
		 ST_EOD_1  == allow trying new write after early warning
		 ST_EOM_ERROR == early warning found, not able to write all */

/* Values of rw */
#define ST_IDLE
#define ST_READING
#define ST_WRITING

/* Values of ready state */
#define ST_READY
#define ST_NOT_READY
#define ST_NO_TAPE

/* Values for door lock state */
#define ST_UNLOCKED
#define ST_LOCKED_EXPLICIT
#define ST_LOCKED_AUTO
#define ST_LOCK_FAILS

/* Positioning SCSI-commands for Tandberg, etc. drives */
#define QFA_REQUEST_BLOCK
#define QFA_SEEK_BLOCK

/* Setting the binary options */
#define ST_DONT_TOUCH
#define ST_NO
#define ST_YES

#define EXTENDED_SENSE_START

/* Masks for some conditions in the sense data */
#define SENSE_FMK
#define SENSE_EOM
#define SENSE_ILI

#endif