diff options
Diffstat (limited to 'drivers/s390/char/tape_3590.h')
-rw-r--r-- | drivers/s390/char/tape_3590.h | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/drivers/s390/char/tape_3590.h b/drivers/s390/char/tape_3590.h new file mode 100644 index 000000000000..cf274b9445a6 --- /dev/null +++ b/drivers/s390/char/tape_3590.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * drivers/s390/char/tape_3590.h | ||
3 | * tape device discipline for 3590 tapes. | ||
4 | * | ||
5 | * Copyright (C) IBM Corp. 2001,2006 | ||
6 | * Author(s): Stefan Bader <shbader@de.ibm.com> | ||
7 | * Michael Holzheu <holzheu@de.ibm.com> | ||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
9 | */ | ||
10 | |||
11 | #ifndef _TAPE_3590_H | ||
12 | #define _TAPE_3590_H | ||
13 | |||
14 | #define MEDIUM_SENSE 0xc2 | ||
15 | #define READ_PREVIOUS 0x0a | ||
16 | #define MODE_SENSE 0xcf | ||
17 | #define PERFORM_SS_FUNC 0x77 | ||
18 | #define READ_SS_DATA 0x3e | ||
19 | |||
20 | #define PREP_RD_SS_DATA 0x18 | ||
21 | #define RD_ATTMSG 0x3 | ||
22 | |||
23 | #define SENSE_BRA_PER 0 | ||
24 | #define SENSE_BRA_CONT 1 | ||
25 | #define SENSE_BRA_RE 2 | ||
26 | #define SENSE_BRA_DRE 3 | ||
27 | |||
28 | #define SENSE_FMT_LIBRARY 0x23 | ||
29 | #define SENSE_FMT_UNSOLICITED 0x40 | ||
30 | #define SENSE_FMT_COMMAND_REJ 0x41 | ||
31 | #define SENSE_FMT_COMMAND_EXEC0 0x50 | ||
32 | #define SENSE_FMT_COMMAND_EXEC1 0x51 | ||
33 | #define SENSE_FMT_EVENT0 0x60 | ||
34 | #define SENSE_FMT_EVENT1 0x61 | ||
35 | #define SENSE_FMT_MIM 0x70 | ||
36 | #define SENSE_FMT_SIM 0x71 | ||
37 | |||
38 | #define MSENSE_UNASSOCIATED 0x00 | ||
39 | #define MSENSE_ASSOCIATED_MOUNT 0x01 | ||
40 | #define MSENSE_ASSOCIATED_UMOUNT 0x02 | ||
41 | |||
42 | #define TAPE_3590_MAX_MSG 0xb0 | ||
43 | |||
44 | /* Datatypes */ | ||
45 | |||
46 | struct tape_3590_disc_data { | ||
47 | unsigned char modeset_byte; | ||
48 | int read_back_op; | ||
49 | }; | ||
50 | |||
51 | struct tape_3590_sense { | ||
52 | |||
53 | unsigned int command_rej:1; | ||
54 | unsigned int interv_req:1; | ||
55 | unsigned int bus_out_check:1; | ||
56 | unsigned int eq_check:1; | ||
57 | unsigned int data_check:1; | ||
58 | unsigned int overrun:1; | ||
59 | unsigned int def_unit_check:1; | ||
60 | unsigned int assgnd_elsew:1; | ||
61 | |||
62 | unsigned int locate_fail:1; | ||
63 | unsigned int inst_online:1; | ||
64 | unsigned int reserved:1; | ||
65 | unsigned int blk_seq_err:1; | ||
66 | unsigned int begin_part:1; | ||
67 | unsigned int wr_mode:1; | ||
68 | unsigned int wr_prot:1; | ||
69 | unsigned int not_cap:1; | ||
70 | |||
71 | unsigned int bra:2; | ||
72 | unsigned int lc:3; | ||
73 | unsigned int vlf_active:1; | ||
74 | unsigned int stm:1; | ||
75 | unsigned int med_pos:1; | ||
76 | |||
77 | unsigned int rac:8; | ||
78 | |||
79 | unsigned int rc_rqc:16; | ||
80 | |||
81 | unsigned int mc:8; | ||
82 | |||
83 | unsigned int sense_fmt:8; | ||
84 | |||
85 | union { | ||
86 | struct { | ||
87 | unsigned int emc:4; | ||
88 | unsigned int smc:4; | ||
89 | unsigned int sev:2; | ||
90 | unsigned int reserved:6; | ||
91 | unsigned int md:8; | ||
92 | unsigned int refcode:8; | ||
93 | unsigned int mid:16; | ||
94 | unsigned int mp:16; | ||
95 | unsigned char volid[6]; | ||
96 | unsigned int fid:8; | ||
97 | } f70; | ||
98 | struct { | ||
99 | unsigned int emc:4; | ||
100 | unsigned int smc:4; | ||
101 | unsigned int sev:2; | ||
102 | unsigned int reserved1:5; | ||
103 | unsigned int mdf:1; | ||
104 | unsigned char md[3]; | ||
105 | unsigned int simid:8; | ||
106 | unsigned int uid:16; | ||
107 | unsigned int refcode1:16; | ||
108 | unsigned int refcode2:16; | ||
109 | unsigned int refcode3:16; | ||
110 | unsigned int reserved2:8; | ||
111 | } f71; | ||
112 | unsigned char data[14]; | ||
113 | } fmt; | ||
114 | unsigned char pad[10]; | ||
115 | |||
116 | } __attribute__ ((packed)); | ||
117 | |||
118 | struct tape_3590_med_sense { | ||
119 | unsigned int macst:4; | ||
120 | unsigned int masst:4; | ||
121 | char pad[127]; | ||
122 | } __attribute__ ((packed)); | ||
123 | |||
124 | #endif /* _TAPE_3590_H */ | ||