root/drivers/scsi/st.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 
   2 #ifndef _ST_H
   3         #define _ST_H
   4 /*
   5         $Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/st.h,v 1.1 1992/04/24 18:01:50 root Exp root $
   6 */
   7 
   8 #ifndef _SCSI_H
   9 #include "scsi.h"
  10 #endif
  11 
  12 typedef struct {
  13   unsigned char in_use;
  14   unsigned char dma;    /* DMA-able buffer */
  15   int buffer_size;
  16   int buffer_blocks;
  17   int buffer_bytes;
  18   int read_pointer;
  19   int writing;
  20   int last_result;
  21   int last_result_fatal;
  22   unsigned char *b_data;
  23   int orig_size;
  24   unsigned char *orig_b_data;
  25 } ST_buffer;
  26 
  27 typedef struct {
  28   kdev_t devt;
  29   unsigned capacity;
  30   struct wait_queue * waiting;
  31   Scsi_Device* device;
  32   unsigned char dirty;
  33   unsigned char rw;
  34   unsigned char ready;
  35   unsigned char eof;
  36   unsigned char write_prot;
  37   unsigned char drv_write_prot;
  38   unsigned char in_use;
  39   unsigned char eof_hit;
  40   unsigned char drv_buffer;
  41   unsigned char restr_dma;
  42   unsigned char do_buffer_writes;
  43   unsigned char do_async_writes;
  44   unsigned char do_read_ahead;
  45   unsigned char do_auto_lock;
  46   unsigned char two_fm;
  47   unsigned char fast_mteom;
  48   unsigned char density;
  49   unsigned char door_locked;
  50   unsigned char rew_at_close;
  51   ST_buffer * buffer;
  52   struct semaphore sem;
  53   int block_size;
  54   int min_block;
  55   int max_block;
  56   int write_threshold;
  57   int recover_count;
  58   int drv_block;        /* The block where the drive head is */
  59   unsigned char moves_after_eof;
  60   unsigned char at_sm;
  61   struct mtget * mt_status;
  62   Scsi_Cmnd SCpnt;
  63 #if DEBUG
  64   unsigned char write_pending;
  65   int nbr_finished;
  66   int nbr_waits;
  67 #endif
  68 } Scsi_Tape;
  69 
  70 extern Scsi_Tape * scsi_tapes;
  71 
  72 /* Values of eof */
  73 #define ST_NOEOF        0
  74 #define ST_FM           1
  75 #define ST_EOM_OK       2
  76 #define ST_EOM_ERROR    3
  77 #define ST_EOD          4
  78 
  79 /* Values of rw */
  80 #define ST_IDLE         0
  81 #define ST_READING      1
  82 #define ST_WRITING      2
  83 
  84 /* Values of ready state */
  85 #define ST_READY        0
  86 #define ST_NOT_READY    1
  87 #define ST_NO_TAPE      2
  88 
  89 /* Values for door lock state */
  90 #define ST_UNLOCKED     0
  91 #define ST_LOCKED_EXPLICIT 1
  92 #define ST_LOCKED_AUTO  2
  93 #define ST_LOCK_FAILS   3
  94 
  95 /* Positioning SCSI-commands for Tandberg, etc. drives */
  96 #define QFA_REQUEST_BLOCK       0x02
  97 #define QFA_SEEK_BLOCK          0x0c
  98 
  99 #endif
 100 

/* [previous][next][first][last][top][bottom][index][help] */