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_DEFINE_EXTENT 0x63
33 #define DASD_ECKD_CCW_WRITE_MT 0x85
34 #define DASD_ECKD_CCW_READ_MT 0x86
35 #define DASD_ECKD_CCW_WRITE_KD_MT 0x8d
36 #define DASD_ECKD_CCW_READ_KD_MT 0x8e
37 #define DASD_ECKD_CCW_RELEASE 0x94
38 #define DASD_ECKD_CCW_READ_CKD_MT 0x9e
39 #define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d
40 #define DASD_ECKD_CCW_RESERVE 0xB4
43 *Perform Subsystem Function / Sub-Orders
45 #define PSF_ORDER_PRSSD 0x18
47 /*****************************************************************************
48 * SECTION: Type Definitions
49 ****************************************************************************/
57 } __attribute__ ((packed
));
62 } __attribute__ ((packed
));
68 } __attribute__ ((packed
));
74 } __attribute__ ((packed
));
80 } __attribute__ ((packed
));
83 __u8 skip_control
[14];
85 __u8 physical_addr
[3];
87 struct ch_t track_addr
;
91 } __attribute__ ((packed
));
95 unsigned char perm
:2; /* Permissions on this extent */
96 unsigned char reserved
:1;
97 unsigned char seek
:2; /* Seek control */
98 unsigned char auth
:2; /* Access authorization */
99 unsigned char pci
:1; /* PCI Fetch mode */
100 } __attribute__ ((packed
)) mask
;
102 unsigned char mode
:2; /* Architecture mode */
103 unsigned char ckd
:1; /* CKD Conversion */
104 unsigned char operation
:3; /* Operation mode */
105 unsigned char cfw
:1; /* Cache fast write */
106 unsigned char dfw
:1; /* DASD fast write */
107 } __attribute__ ((packed
)) attributes
;
108 __u16 blk_size
; /* Blocksize */
110 __u8 ga_additional
; /* Global Attributes Additional */
111 __u8 ga_extended
; /* Global Attributes Extended */
114 unsigned long long ep_sys_time
; /* Ext Parameter - System Time Stamp */
115 __u8 ep_format
; /* Extended Parameter format byte */
116 __u8 ep_prio
; /* Extended Parameter priority I/O byte */
117 __u8 ep_reserved
[6]; /* Extended Parameter Reserved */
118 } __attribute__ ((packed
));
120 struct LO_eckd_data
{
122 unsigned char orientation
:2;
123 unsigned char operation
:6;
124 } __attribute__ ((packed
)) operation
;
126 unsigned char last_bytes_used
:1;
127 unsigned char reserved
:6;
128 unsigned char read_count_suffix
:1;
129 } __attribute__ ((packed
)) auxiliary
;
132 struct ch_t seek_addr
;
133 struct chr_t search_arg
;
136 } __attribute__ ((packed
));
138 struct dasd_eckd_characteristics
{
141 unsigned char support
:2;
142 unsigned char async
:1;
143 unsigned char reserved
:1;
144 unsigned char cache_info
:1;
145 unsigned char model
:3;
146 } __attribute__ ((packed
)) cu_model
;
150 unsigned char mult_burst
:1;
151 unsigned char RT_in_LR
:1;
152 unsigned char reserved1
:1;
153 unsigned char RD_IN_LR
:1;
154 unsigned char reserved2
:4;
155 unsigned char reserved3
:8;
156 unsigned char defect_wr
:1;
157 unsigned char XRC_supported
:1;
158 unsigned char reserved4
:1;
159 unsigned char striping
:1;
160 unsigned char reserved5
:4;
162 unsigned char reserved6
:2;
163 unsigned char cache
:1;
164 unsigned char dual_copy
:1;
166 unsigned char reset_alleg
:1;
167 unsigned char sense_down
:1;
168 } __attribute__ ((packed
)) facilities
;
174 __u8 byte_per_track
[3];
182 } __attribute__ ((packed
)) f_0x01
;
189 } __attribute__ ((packed
)) f_0x02
;
190 } __attribute__ ((packed
)) factors
;
209 } __attribute__ ((packed
));
211 struct dasd_eckd_confdata
{
214 unsigned char identifier
:2;
215 unsigned char token_id
:1;
216 unsigned char sno_valid
:1;
217 unsigned char subst_sno
:1;
218 unsigned char recNED
:1;
219 unsigned char emuNED
:1;
220 unsigned char reserved
:1;
221 } __attribute__ ((packed
)) flags
;
225 unsigned char dev_type
[6];
226 unsigned char dev_model
[3];
227 unsigned char HDA_manufacturer
[3];
228 unsigned char HDA_location
[2];
229 unsigned char HDA_seqno
[12];
231 } __attribute__ ((packed
)) ned1
;
234 unsigned char identifier
:2;
235 unsigned char token_id
:1;
236 unsigned char sno_valid
:1;
237 unsigned char subst_sno
:1;
238 unsigned char recNED
:1;
239 unsigned char emuNED
:1;
240 unsigned char reserved
:1;
241 } __attribute__ ((packed
)) flags
;
244 unsigned char dev_type
[6];
245 unsigned char dev_model
[3];
246 unsigned char DASD_manufacturer
[3];
247 unsigned char DASD_location
[2];
248 unsigned char DASD_seqno
[12];
250 } __attribute__ ((packed
)) ned2
;
253 unsigned char identifier
:2;
254 unsigned char token_id
:1;
255 unsigned char sno_valid
:1;
256 unsigned char subst_sno
:1;
257 unsigned char recNED
:1;
258 unsigned char emuNED
:1;
259 unsigned char reserved
:1;
260 } __attribute__ ((packed
)) flags
;
263 unsigned char cont_type
[6];
264 unsigned char cont_model
[3];
265 unsigned char cont_manufacturer
[3];
266 unsigned char cont_location
[2];
267 unsigned char cont_seqno
[12];
269 } __attribute__ ((packed
)) ned3
;
272 unsigned char identifier
:2;
273 unsigned char token_id
:1;
274 unsigned char sno_valid
:1;
275 unsigned char subst_sno
:1;
276 unsigned char recNED
:1;
277 unsigned char emuNED
:1;
278 unsigned char reserved
:1;
279 } __attribute__ ((packed
)) flags
;
282 unsigned char cont_type
[6];
283 unsigned char empty
[3];
284 unsigned char cont_manufacturer
[3];
285 unsigned char cont_location
[2];
286 unsigned char cont_seqno
[12];
288 } __attribute__ ((packed
)) ned4
;
289 unsigned char ned5
[32];
290 unsigned char ned6
[32];
291 unsigned char ned7
[32];
294 unsigned char identifier
:2;
295 unsigned char reserved
:6;
296 } __attribute__ ((packed
)) flags
;
304 unsigned char reserved
:5;
305 unsigned char scluster
:1;
306 } __attribute__ ((packed
)) spathID
;
313 unsigned char parallel
:1;
314 unsigned char escon
:1;
315 unsigned char reserved
:1;
316 unsigned char ficon
:1;
317 unsigned char reserved2
:4;
318 } __attribute__ ((packed
)) protocol_type
;
320 unsigned char PID_in_236
:1;
321 unsigned char reserved
:7;
322 } __attribute__ ((packed
)) format_flags
;
323 __u8 log_dev_address
;
324 unsigned char reserved2
[12];
325 } __attribute__ ((packed
)) neq
;
326 } __attribute__ ((packed
));
328 struct dasd_eckd_path
{
335 * Perform Subsystem Function - Prepare for Read Subsystem Data
337 struct dasd_psf_prssd_data
{
340 unsigned char reserved
[4];
341 unsigned char suborder
;
342 unsigned char varies
[9];
343 } __attribute__ ((packed
));
345 #endif /* DASD_ECKD_H */