Horst Hummel | 138c014 | 2006-06-29 14:58:12 +0200 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> |
Heiko Carstens | a53c8fa | 2012-07-20 11:15:04 +0200 | [diff] [blame] | 6 | * Copyright IBM Corp. 1999, 2000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Horst Hummel | fd49f41 | 2005-09-03 15:58:00 -0700 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Horst Hummel | fd49f41 | 2005-09-03 15:58:00 -0700 | [diff] [blame] | 41 | #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT |
| 42 | |
| 43 | typedef u64 blocknum_t; |
| 44 | typedef s64 sblocknum_t; |
| 45 | |
| 46 | struct dasd_diag_bio { |
| 47 | u8 type; |
| 48 | u8 status; |
| 49 | u8 spare1[2]; |
| 50 | u32 alet; |
| 51 | blocknum_t block_number; |
Peter Oberparleiter | 86b368a | 2005-11-07 00:59:08 -0800 | [diff] [blame] | 52 | void *buffer; |
Horst Hummel | fd49f41 | 2005-09-03 15:58:00 -0700 | [diff] [blame] | 53 | } __attribute__ ((packed, aligned(8))); |
| 54 | |
| 55 | struct dasd_diag_init_io { |
| 56 | u16 dev_nr; |
| 57 | u8 flaga; |
| 58 | u8 spare1[21]; |
| 59 | u32 block_size; |
| 60 | u8 spare2[4]; |
| 61 | blocknum_t offset; |
| 62 | sblocknum_t start_block; |
| 63 | blocknum_t end_block; |
| 64 | u8 spare3[8]; |
| 65 | } __attribute__ ((packed, aligned(8))); |
| 66 | |
| 67 | struct dasd_diag_rw_io { |
| 68 | u16 dev_nr; |
| 69 | u8 flaga; |
| 70 | u8 spare1[21]; |
| 71 | u8 key; |
| 72 | u8 flags; |
| 73 | u8 spare2[2]; |
| 74 | u32 block_count; |
| 75 | u32 alet; |
| 76 | u8 spare3[4]; |
| 77 | u64 interrupt_params; |
Peter Oberparleiter | 86b368a | 2005-11-07 00:59:08 -0800 | [diff] [blame] | 78 | struct dasd_diag_bio *bio_list; |
Horst Hummel | fd49f41 | 2005-09-03 15:58:00 -0700 | [diff] [blame] | 79 | u8 spare4[8]; |
| 80 | } __attribute__ ((packed, aligned(8))); |