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