xref: /openbmc/linux/drivers/s390/block/dasd_fba.h (revision 1804569d)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4  * Bugreports.to..: <Linux390@de.ibm.com>
5  * Coypright IBM Corp. 1999, 2000
6  *
7  */
8 
9 #ifndef DASD_FBA_H
10 #define DASD_FBA_H
11 
12 struct DE_fba_data {
13 	struct {
14 		unsigned char perm:2;	/* Permissions on this extent */
15 		unsigned char zero:2;	/* Must be zero */
16 		unsigned char da:1;	/* usually zero */
17 		unsigned char diag:1;	/* allow diagnose */
18 		unsigned char zero2:2;	/* zero */
19 	} __attribute__ ((packed)) mask;
20 	__u8 zero;		/* Must be zero */
21 	__u16 blk_size;		/* Blocksize */
22 	__u32 ext_loc;		/* Extent locator */
23 	__u32 ext_beg;		/* logical number of block 0 in extent */
24 	__u32 ext_end;		/* logocal number of last block in extent */
25 } __attribute__ ((packed));
26 
27 struct LO_fba_data {
28 	struct {
29 		unsigned char zero:4;
30 		unsigned char cmd:4;
31 	} __attribute__ ((packed)) operation;
32 	__u8 auxiliary;
33 	__u16 blk_ct;
34 	__u32 blk_nr;
35 } __attribute__ ((packed));
36 
37 struct dasd_fba_characteristics {
38 	union {
39 		__u8 c;
40 		struct {
41 			unsigned char reserved:1;
42 			unsigned char overrunnable:1;
43 			unsigned char burst_byte:1;
44 			unsigned char data_chain:1;
45 			unsigned char zeros:4;
46 		} __attribute__ ((packed)) bits;
47 	} __attribute__ ((packed)) mode;
48 	union {
49 		__u8 c;
50 		struct {
51 			unsigned char zero0:1;
52 			unsigned char removable:1;
53 			unsigned char shared:1;
54 			unsigned char zero1:1;
55 			unsigned char mam:1;
56 			unsigned char zeros:3;
57 		} __attribute__ ((packed)) bits;
58 	} __attribute__ ((packed)) features;
59 	__u8 dev_class;
60 	__u8 unit_type;
61 	__u16 blk_size;
62 	__u32 blk_per_cycl;
63 	__u32 blk_per_bound;
64 	__u32 blk_bdsa;
65 	__u32 reserved0;
66 	__u16 reserved1;
67 	__u16 blk_ce;
68 	__u32 reserved2;
69 	__u16 reserved3;
70 } __attribute__ ((packed));
71 
72 #endif				/* DASD_FBA_H */
73