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