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