0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #define MDSK_WRITE_REQ 0x01
0012 #define MDSK_READ_REQ 0x02
0013
0014 #define INIT_BIO 0x00
0015 #define RW_BIO 0x01
0016 #define TERM_BIO 0x02
0017
0018 #define DEV_CLASS_FBA 0x01
0019 #define DEV_CLASS_ECKD 0x04
0020
0021 #define DASD_DIAG_CODE_31BIT 0x03
0022 #define DASD_DIAG_CODE_64BIT 0x07
0023
0024 #define DASD_DIAG_RWFLAG_ASYNC 0x02
0025 #define DASD_DIAG_RWFLAG_NOCACHE 0x01
0026
0027 #define DASD_DIAG_FLAGA_FORMAT_64BIT 0x80
0028
0029 struct dasd_diag_characteristics {
0030 u16 dev_nr;
0031 u16 rdc_len;
0032 u8 vdev_class;
0033 u8 vdev_type;
0034 u8 vdev_status;
0035 u8 vdev_flags;
0036 u8 rdev_class;
0037 u8 rdev_type;
0038 u8 rdev_model;
0039 u8 rdev_features;
0040 } __attribute__ ((packed, aligned(4)));
0041
0042 #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT
0043
0044 typedef u64 blocknum_t;
0045 typedef s64 sblocknum_t;
0046
0047 struct dasd_diag_bio {
0048 u8 type;
0049 u8 status;
0050 u8 spare1[2];
0051 u32 alet;
0052 blocknum_t block_number;
0053 void *buffer;
0054 } __attribute__ ((packed, aligned(8)));
0055
0056 struct dasd_diag_init_io {
0057 u16 dev_nr;
0058 u8 flaga;
0059 u8 spare1[21];
0060 u32 block_size;
0061 u8 spare2[4];
0062 blocknum_t offset;
0063 sblocknum_t start_block;
0064 blocknum_t end_block;
0065 u8 spare3[8];
0066 } __attribute__ ((packed, aligned(8)));
0067
0068 struct dasd_diag_rw_io {
0069 u16 dev_nr;
0070 u8 flaga;
0071 u8 spare1[21];
0072 u8 key;
0073 u8 flags;
0074 u8 spare2[2];
0075 u32 block_count;
0076 u32 alet;
0077 u8 spare3[4];
0078 u64 interrupt_params;
0079 struct dasd_diag_bio *bio_list;
0080 u8 spare4[8];
0081 } __attribute__ ((packed, aligned(8)));