1
2 #ifndef _ST_H
3 #define _ST_H
4
5
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 dirty:1;
29 unsigned rw:2;
30 unsigned eof:2;
31 unsigned write_prot:1;
32 unsigned in_use:1;
33 unsigned eof_hit:1;
34 unsigned drv_buffer:3;
35 unsigned do_buffer_writes:1;
36 unsigned do_async_writes:1;
37 unsigned do_read_ahead:1;
38 unsigned char density;
39 ST_buffer * buffer;
40 int block_size;
41 int min_block;
42 int max_block;
43 int write_threshold;
44 int recover_count;
45 int drv_block;
46 struct mtget * mt_status;
47 Scsi_Cmnd SCpnt;
48 } Scsi_Tape;
49
50
51 #define ST_NOEOF 0
52 #define ST_FM 1
53 #define ST_EOM_OK 2
54 #define ST_EOM_ERROR 3
55
56
57 #define ST_IDLE 0
58 #define ST_READING 1
59 #define ST_WRITING 2
60
61
62 #define QFA_REQUEST_BLOCK 0x02
63 #define QFA_SEEK_BLOCK 0x0c
64
65 #endif
66