home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / drivers / scsi / st.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-13  |  1.5 KB  |  79 lines

  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.   int in_use;
  14.   int buffer_size;
  15.   int buffer_blocks;
  16.   int buffer_bytes;
  17.   int read_pointer;
  18.   int writing;
  19.   int last_result;
  20.   int last_result_fatal;
  21.   unsigned char b_data[1];
  22. } ST_buffer;
  23.  
  24. typedef struct {
  25.   unsigned capacity;
  26.   struct wait_queue * waiting;
  27.   Scsi_Device* device;
  28.   unsigned char dirty;
  29.   unsigned char rw;
  30.   unsigned char ready;
  31.   unsigned char eof;
  32.   unsigned char write_prot;
  33.   unsigned char drv_write_prot;
  34.   unsigned char in_use;
  35.   unsigned char eof_hit;
  36.   unsigned char drv_buffer;
  37.   unsigned char do_buffer_writes;
  38.   unsigned char do_async_writes;
  39.   unsigned char do_read_ahead;
  40.   unsigned char two_fm;
  41.   unsigned char fast_mteom;
  42.   unsigned char density;
  43.   ST_buffer * buffer;
  44.   int block_size;
  45.   int min_block;
  46.   int max_block;
  47.   int write_threshold;
  48.   int recover_count;
  49.   int drv_block;    /* The block where the drive head is */
  50.   unsigned char moves_after_eof;
  51.   unsigned char at_sm;
  52.   struct mtget * mt_status;
  53.   Scsi_Cmnd SCpnt;
  54. } Scsi_Tape;
  55.  
  56. /* Values of eof */
  57. #define    ST_NOEOF    0
  58. #define    ST_FM        1
  59. #define    ST_EOM_OK    2
  60. #define ST_EOM_ERROR    3
  61. #define ST_EOD        4
  62.  
  63. /* Values of rw */
  64. #define    ST_IDLE        0
  65. #define    ST_READING    1
  66. #define    ST_WRITING    2
  67.  
  68. /* Values of ready state */
  69. #define ST_READY    0
  70. #define ST_NOT_READY    1
  71. #define ST_NO_TAPE    2
  72.  
  73. /* Positioning SCSI-commands for Tandberg, etc. drives */
  74. #define    QFA_REQUEST_BLOCK    0x02
  75. #define    QFA_SEEK_BLOCK        0x0c
  76.  
  77. #endif
  78.  
  79.