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