1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef DASD_H
16#define DASD_H
17#include <linux/types.h>
18#include <linux/ioctl.h>
19
20#define DASD_IOCTL_LETTER 'D'
21
22#define DASD_API_VERSION 6
23
24
25
26
27
28
29typedef struct dasd_information2_t {
30 unsigned int devno;
31 unsigned int real_devno;
32 unsigned int schid;
33 unsigned int cu_type : 16;
34 unsigned int cu_model : 8;
35 unsigned int dev_type : 16;
36 unsigned int dev_model : 8;
37 unsigned int open_count;
38 unsigned int req_queue_len;
39 unsigned int chanq_len;
40 char type[4];
41 unsigned int status;
42 unsigned int label_block;
43 unsigned int FBA_layout;
44 unsigned int characteristics_size;
45 unsigned int confdata_size;
46 char characteristics[64];
47 char configuration_data[256];
48 unsigned int format;
49 unsigned int features;
50 unsigned int reserved0;
51 unsigned int reserved1;
52 unsigned int reserved2;
53 unsigned int reserved3;
54 unsigned int reserved4;
55 unsigned int reserved5;
56 unsigned int reserved6;
57 unsigned int reserved7;
58} dasd_information2_t;
59
60
61
62
63
64
65
66#define DASD_FORMAT_NONE 0
67#define DASD_FORMAT_LDL 1
68#define DASD_FORMAT_CDL 2
69
70
71
72
73
74
75
76
77#define DASD_FEATURE_DEFAULT 0x00
78#define DASD_FEATURE_READONLY 0x01
79#define DASD_FEATURE_USEDIAG 0x02
80#define DASD_FEATURE_INITIAL_ONLINE 0x04
81#define DASD_FEATURE_ERPLOG 0x08
82#define DASD_FEATURE_FAILFAST 0x10
83
84#define DASD_PARTN_BITS 2
85
86
87
88
89
90typedef struct dasd_information_t {
91 unsigned int devno;
92 unsigned int real_devno;
93 unsigned int schid;
94 unsigned int cu_type : 16;
95 unsigned int cu_model : 8;
96 unsigned int dev_type : 16;
97 unsigned int dev_model : 8;
98 unsigned int open_count;
99 unsigned int req_queue_len;
100 unsigned int chanq_len;
101 char type[4];
102 unsigned int status;
103 unsigned int label_block;
104 unsigned int FBA_layout;
105 unsigned int characteristics_size;
106 unsigned int confdata_size;
107 char characteristics[64];
108 char configuration_data[256];
109} dasd_information_t;
110
111
112
113
114typedef struct dasd_rssd_perf_stats_t {
115 unsigned char invalid:1;
116 unsigned char format:3;
117 unsigned char data_format:4;
118 unsigned char unit_address;
119 unsigned short device_status;
120 unsigned int nr_read_normal;
121 unsigned int nr_read_normal_hits;
122 unsigned int nr_write_normal;
123 unsigned int nr_write_fast_normal_hits;
124 unsigned int nr_read_seq;
125 unsigned int nr_read_seq_hits;
126 unsigned int nr_write_seq;
127 unsigned int nr_write_fast_seq_hits;
128 unsigned int nr_read_cache;
129 unsigned int nr_read_cache_hits;
130 unsigned int nr_write_cache;
131 unsigned int nr_write_fast_cache_hits;
132 unsigned int nr_inhibit_cache;
133 unsigned int nr_bybass_cache;
134 unsigned int nr_seq_dasd_to_cache;
135 unsigned int nr_dasd_to_cache;
136 unsigned int nr_cache_to_dasd;
137 unsigned int nr_delayed_fast_write;
138 unsigned int nr_normal_fast_write;
139 unsigned int nr_seq_fast_write;
140 unsigned int nr_cache_miss;
141 unsigned char status2;
142 unsigned int nr_quick_write_promotes;
143 unsigned char reserved;
144 unsigned short ssid;
145 unsigned char reseved2[96];
146} __attribute__((packed)) dasd_rssd_perf_stats_t;
147
148
149
150
151
152typedef struct dasd_profile_info_t {
153 unsigned int dasd_io_reqs;
154 unsigned int dasd_io_sects;
155 unsigned int dasd_io_secs[32];
156 unsigned int dasd_io_times[32];
157 unsigned int dasd_io_timps[32];
158 unsigned int dasd_io_time1[32];
159 unsigned int dasd_io_time2[32];
160 unsigned int dasd_io_time2ps[32];
161 unsigned int dasd_io_time3[32];
162 unsigned int dasd_io_nr_req[32];
163} dasd_profile_info_t;
164
165
166
167
168
169typedef struct format_data_t {
170 unsigned int start_unit;
171 unsigned int stop_unit;
172 unsigned int blksize;
173 unsigned int intensity;
174} format_data_t;
175
176
177
178
179
180
181
182
183#define DASD_FMT_INT_FMT_R0 1
184#define DASD_FMT_INT_FMT_HA 2
185#define DASD_FMT_INT_INVAL 4
186#define DASD_FMT_INT_COMPAT 8
187
188
189
190
191
192
193
194typedef struct attrib_data_t {
195 unsigned char operation:3;
196 unsigned char reserved:5;
197 __u16 nr_cyl;
198 __u8 reserved2[29];
199} __attribute__ ((packed)) attrib_data_t;
200
201
202#define DASD_NORMAL_CACHE 0x0
203#define DASD_BYPASS_CACHE 0x1
204#define DASD_INHIBIT_LOAD 0x2
205#define DASD_SEQ_ACCESS 0x3
206#define DASD_SEQ_PRESTAGE 0x4
207#define DASD_REC_ACCESS 0x5
208
209
210
211
212typedef struct dasd_symmio_parms {
213 unsigned char reserved[8];
214 unsigned long long psf_data;
215 unsigned long long rssd_result;
216 int psf_data_len;
217 int rssd_result_len;
218} __attribute__ ((packed)) dasd_symmio_parms_t;
219
220
221
222
223
224
225
226
227
228
229
230#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
231
232#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
233
234#define BIODASDRSRV _IO(DASD_IOCTL_LETTER,2)
235#define BIODASDRLSE _IO(DASD_IOCTL_LETTER,3)
236#define BIODASDSLCK _IO(DASD_IOCTL_LETTER,4)
237
238#define BIODASDPRRST _IO(DASD_IOCTL_LETTER,5)
239
240#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
241
242#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
243
244
245
246#define DASDAPIVER _IOR(DASD_IOCTL_LETTER,0,int)
247
248#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
249
250#define BIODASDPRRD _IOR(DASD_IOCTL_LETTER,2,dasd_profile_info_t)
251
252#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER,3,dasd_information2_t)
253
254#define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
255
256#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
257
258
259
260#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
261
262#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
263
264#define BIODASDSYMMIO _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t)
265
266#endif
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286