1 /* 2 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Based on.......: linux/drivers/s390/block/mdisk.h 4 * ...............: by Hartmunt Penner <hpenner@de.ibm.com> 5 * Bugreports.to..: <Linux390@de.ibm.com> 6 * Copyright IBM Corp. 1999, 2000 7 * 8 */ 9 10 #define MDSK_WRITE_REQ 0x01 11 #define MDSK_READ_REQ 0x02 12 13 #define INIT_BIO 0x00 14 #define RW_BIO 0x01 15 #define TERM_BIO 0x02 16 17 #define DEV_CLASS_FBA 0x01 18 #define DEV_CLASS_ECKD 0x04 19 20 #define DASD_DIAG_CODE_31BIT 0x03 21 #define DASD_DIAG_CODE_64BIT 0x07 22 23 #define DASD_DIAG_RWFLAG_ASYNC 0x02 24 #define DASD_DIAG_RWFLAG_NOCACHE 0x01 25 26 #define DASD_DIAG_FLAGA_FORMAT_64BIT 0x80 27 28 struct dasd_diag_characteristics { 29 u16 dev_nr; 30 u16 rdc_len; 31 u8 vdev_class; 32 u8 vdev_type; 33 u8 vdev_status; 34 u8 vdev_flags; 35 u8 rdev_class; 36 u8 rdev_type; 37 u8 rdev_model; 38 u8 rdev_features; 39 } __attribute__ ((packed, aligned(4))); 40 41 42 #ifdef CONFIG_64BIT 43 #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT 44 45 typedef u64 blocknum_t; 46 typedef s64 sblocknum_t; 47 48 struct dasd_diag_bio { 49 u8 type; 50 u8 status; 51 u8 spare1[2]; 52 u32 alet; 53 blocknum_t block_number; 54 void *buffer; 55 } __attribute__ ((packed, aligned(8))); 56 57 struct dasd_diag_init_io { 58 u16 dev_nr; 59 u8 flaga; 60 u8 spare1[21]; 61 u32 block_size; 62 u8 spare2[4]; 63 blocknum_t offset; 64 sblocknum_t start_block; 65 blocknum_t end_block; 66 u8 spare3[8]; 67 } __attribute__ ((packed, aligned(8))); 68 69 struct dasd_diag_rw_io { 70 u16 dev_nr; 71 u8 flaga; 72 u8 spare1[21]; 73 u8 key; 74 u8 flags; 75 u8 spare2[2]; 76 u32 block_count; 77 u32 alet; 78 u8 spare3[4]; 79 u64 interrupt_params; 80 struct dasd_diag_bio *bio_list; 81 u8 spare4[8]; 82 } __attribute__ ((packed, aligned(8))); 83 #else /* CONFIG_64BIT */ 84 #define DASD_DIAG_FLAGA_DEFAULT 0x0 85 86 typedef u32 blocknum_t; 87 typedef s32 sblocknum_t; 88 89 struct dasd_diag_bio { 90 u8 type; 91 u8 status; 92 u16 spare1; 93 blocknum_t block_number; 94 u32 alet; 95 void *buffer; 96 } __attribute__ ((packed, aligned(8))); 97 98 struct dasd_diag_init_io { 99 u16 dev_nr; 100 u8 flaga; 101 u8 spare1[21]; 102 u32 block_size; 103 blocknum_t offset; 104 sblocknum_t start_block; 105 blocknum_t end_block; 106 u8 spare2[24]; 107 } __attribute__ ((packed, aligned(8))); 108 109 struct dasd_diag_rw_io { 110 u16 dev_nr; 111 u8 flaga; 112 u8 spare1[21]; 113 u8 key; 114 u8 flags; 115 u8 spare2[2]; 116 u32 block_count; 117 u32 alet; 118 struct dasd_diag_bio *bio_list; 119 u32 interrupt_params; 120 u8 spare3[20]; 121 } __attribute__ ((packed, aligned(8))); 122 #endif /* CONFIG_64BIT */ 123