Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dasd_diag.h
Go to the documentation of this file.
1 /*
2  * Author(s)......: Holger Smolinski <[email protected]>
3  * Based on.......: linux/drivers/s390/block/mdisk.h
4  * ...............: by Hartmunt Penner <[email protected]>
5  * Bugreports.to..: <[email protected]>
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 
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 {
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];
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];
77  u32 alet;
78  u8 spare3[4];
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 {
93  blocknum_t block_number;
95  void *buffer;
96 } __attribute__ ((packed, aligned(8)));
97 
101  u8 spare1[21];
103  blocknum_t offset;
104  sblocknum_t start_block;
105  blocknum_t end_block;
106  u8 spare2[24];
107 } __attribute__ ((packed, aligned(8)));
108 
112  u8 spare1[21];
115  u8 spare2[2];
120  u8 spare3[20];
121 } __attribute__ ((packed, aligned(8)));
122 #endif /* CONFIG_64BIT */