2 * File...........: linux/drivers/s390/block/dasd_eckd.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Bugreports.to..: <Linux390@de.ibm.com>
6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
13 /*****************************************************************************
14 * SECTION: CCW Definitions
15 ****************************************************************************/
16 #define DASD_ECKD_CCW_WRITE 0x05
17 #define DASD_ECKD_CCW_READ 0x06
18 #define DASD_ECKD_CCW_WRITE_HOME_ADDRESS 0x09
19 #define DASD_ECKD_CCW_READ_HOME_ADDRESS 0x0a
20 #define DASD_ECKD_CCW_WRITE_KD 0x0d
21 #define DASD_ECKD_CCW_READ_KD 0x0e
22 #define DASD_ECKD_CCW_ERASE 0x11
23 #define DASD_ECKD_CCW_READ_COUNT 0x12
24 #define DASD_ECKD_CCW_SLCK 0x14
25 #define DASD_ECKD_CCW_WRITE_RECORD_ZERO 0x15
26 #define DASD_ECKD_CCW_READ_RECORD_ZERO 0x16
27 #define DASD_ECKD_CCW_WRITE_CKD 0x1d
28 #define DASD_ECKD_CCW_READ_CKD 0x1e
29 #define DASD_ECKD_CCW_PSF 0x27
30 #define DASD_ECKD_CCW_RSSD 0x3e
31 #define DASD_ECKD_CCW_LOCATE_RECORD 0x47
32 #define DASD_ECKD_CCW_SNSS 0x54
33 #define DASD_ECKD_CCW_DEFINE_EXTENT 0x63
34 #define DASD_ECKD_CCW_WRITE_MT 0x85
35 #define DASD_ECKD_CCW_READ_MT 0x86
36 #define DASD_ECKD_CCW_WRITE_KD_MT 0x8d
37 #define DASD_ECKD_CCW_READ_KD_MT 0x8e
38 #define DASD_ECKD_CCW_RELEASE 0x94
39 #define DASD_ECKD_CCW_READ_CKD_MT 0x9e
40 #define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d
41 #define DASD_ECKD_CCW_RESERVE 0xB4
44 * Perform Subsystem Function / Sub-Orders
46 #define PSF_ORDER_PRSSD 0x18
47 #define PSF_ORDER_SSC 0x1D
49 /*****************************************************************************
50 * SECTION: Type Definitions
51 ****************************************************************************/
59 } __attribute__ ((packed));
64 } __attribute__ ((packed));
70 } __attribute__ ((packed));
76 } __attribute__ ((packed));
82 } __attribute__ ((packed));
85 __u8 skip_control[14];
87 __u8 physical_addr[3];
89 struct ch_t track_addr;
93 } __attribute__ ((packed));
97 unsigned char perm:2; /* Permissions on this extent */
98 unsigned char reserved:1;
99 unsigned char seek:2; /* Seek control */
100 unsigned char auth:2; /* Access authorization */
101 unsigned char pci:1; /* PCI Fetch mode */
102 } __attribute__ ((packed)) mask;
104 unsigned char mode:2; /* Architecture mode */
105 unsigned char ckd:1; /* CKD Conversion */
106 unsigned char operation:3; /* Operation mode */
107 unsigned char cfw:1; /* Cache fast write */
108 unsigned char dfw:1; /* DASD fast write */
109 } __attribute__ ((packed)) attributes;
110 __u16 blk_size; /* Blocksize */
112 __u8 ga_additional; /* Global Attributes Additional */
113 __u8 ga_extended; /* Global Attributes Extended */
116 unsigned long long ep_sys_time; /* Ext Parameter - System Time Stamp */
117 __u8 ep_format; /* Extended Parameter format byte */
118 __u8 ep_prio; /* Extended Parameter priority I/O byte */
119 __u8 ep_reserved[6]; /* Extended Parameter Reserved */
120 } __attribute__ ((packed));
122 struct LO_eckd_data {
124 unsigned char orientation:2;
125 unsigned char operation:6;
126 } __attribute__ ((packed)) operation;
128 unsigned char last_bytes_used:1;
129 unsigned char reserved:6;
130 unsigned char read_count_suffix:1;
131 } __attribute__ ((packed)) auxiliary;
134 struct ch_t seek_addr;
135 struct chr_t search_arg;
138 } __attribute__ ((packed));
140 struct dasd_eckd_characteristics {
143 unsigned char support:2;
144 unsigned char async:1;
145 unsigned char reserved:1;
146 unsigned char cache_info:1;
147 unsigned char model:3;
148 } __attribute__ ((packed)) cu_model;
152 unsigned char mult_burst:1;
153 unsigned char RT_in_LR:1;
154 unsigned char reserved1:1;
155 unsigned char RD_IN_LR:1;
156 unsigned char reserved2:4;
157 unsigned char reserved3:8;
158 unsigned char defect_wr:1;
159 unsigned char XRC_supported:1;
160 unsigned char reserved4:1;
161 unsigned char striping:1;
162 unsigned char reserved5:4;
164 unsigned char reserved6:2;
165 unsigned char cache:1;
166 unsigned char dual_copy:1;
168 unsigned char reset_alleg:1;
169 unsigned char sense_down:1;
170 } __attribute__ ((packed)) facilities;
176 __u8 byte_per_track[3];
184 } __attribute__ ((packed)) f_0x01;
191 } __attribute__ ((packed)) f_0x02;
192 } __attribute__ ((packed)) factors;
211 } __attribute__ ((packed));
213 struct dasd_eckd_confdata {
216 unsigned char identifier:2;
217 unsigned char token_id:1;
218 unsigned char sno_valid:1;
219 unsigned char subst_sno:1;
220 unsigned char recNED:1;
221 unsigned char emuNED:1;
222 unsigned char reserved:1;
223 } __attribute__ ((packed)) flags;
227 unsigned char dev_type[6];
228 unsigned char dev_model[3];
229 unsigned char HDA_manufacturer[3];
230 unsigned char HDA_location[2];
231 unsigned char HDA_seqno[12];
234 } __attribute__ ((packed)) ned1;
238 unsigned char identifier:2;
239 unsigned char token_id:1;
240 unsigned char sno_valid:1;
241 unsigned char subst_sno:1;
242 unsigned char recNED:1;
243 unsigned char emuNED:1;
244 unsigned char reserved:1;
245 } __attribute__ ((packed)) flags;
248 unsigned char dev_type[6];
249 unsigned char dev_model[3];
250 unsigned char DASD_manufacturer[3];
251 unsigned char DASD_location[2];
252 unsigned char DASD_seqno[12];
254 } __attribute__ ((packed)) ned;
256 unsigned char flags; /* byte 0 */
257 unsigned char res2[7]; /* byte 1- 7 */
258 unsigned char sua_flags; /* byte 8 */
259 __u8 base_unit_addr; /* byte 9 */
260 unsigned char res3[22]; /* byte 10-31 */
261 } __attribute__ ((packed)) sneq;
262 } __attribute__ ((packed)) ned2;
265 unsigned char identifier:2;
266 unsigned char token_id:1;
267 unsigned char sno_valid:1;
268 unsigned char subst_sno:1;
269 unsigned char recNED:1;
270 unsigned char emuNED:1;
271 unsigned char reserved:1;
272 } __attribute__ ((packed)) flags;
275 unsigned char cont_type[6];
276 unsigned char cont_model[3];
277 unsigned char cont_manufacturer[3];
278 unsigned char cont_location[2];
279 unsigned char cont_seqno[12];
281 } __attribute__ ((packed)) ned3;
284 unsigned char identifier:2;
285 unsigned char token_id:1;
286 unsigned char sno_valid:1;
287 unsigned char subst_sno:1;
288 unsigned char recNED:1;
289 unsigned char emuNED:1;
290 unsigned char reserved:1;
291 } __attribute__ ((packed)) flags;
294 unsigned char cont_type[6];
295 unsigned char empty[3];
296 unsigned char cont_manufacturer[3];
297 unsigned char cont_location[2];
298 unsigned char cont_seqno[12];
300 } __attribute__ ((packed)) ned4;
301 unsigned char ned5[32];
302 unsigned char ned6[32];
303 unsigned char ned7[32];
306 unsigned char identifier:2;
307 unsigned char reserved:6;
308 } __attribute__ ((packed)) flags;
316 unsigned char reserved:5;
317 unsigned char scluster:1;
318 } __attribute__ ((packed)) spathID;
325 unsigned char parallel:1;
326 unsigned char escon:1;
327 unsigned char reserved:1;
328 unsigned char ficon:1;
329 unsigned char reserved2:4;
330 } __attribute__ ((packed)) protocol_type;
332 unsigned char PID_in_236:1;
333 unsigned char reserved:7;
334 } __attribute__ ((packed)) format_flags;
335 __u8 log_dev_address;
336 unsigned char reserved2[12];
337 } __attribute__ ((packed)) neq;
338 } __attribute__ ((packed));
340 struct dasd_eckd_path {
347 * Perform Subsystem Function - Prepare for Read Subsystem Data
349 struct dasd_psf_prssd_data {
352 unsigned char reserved[4];
353 unsigned char suborder;
354 unsigned char varies[9];
355 } __attribute__ ((packed));
358 * Perform Subsystem Function - Set Subsystem Characteristics
360 struct dasd_psf_ssc_data {
363 unsigned char cu_type[4];
364 unsigned char suborder;
365 unsigned char reserved[59];
366 } __attribute__((packed));
368 #endif /* DASD_ECKD_H */