[PATCH] W1: w1_netlink: New init/fini netlink callbacks.
[linux-2.6/verdex.git] / drivers / s390 / block / dasd_diag.h
blobb26eb28df4bf093e4b6816275ba46d91d4236896
1 /*
2 * File...........: linux/drivers/s390/block/dasd_diag.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Based on.......: linux/drivers/s390/block/mdisk.h
5 * ...............: by Hartmunt Penner <hpenner@de.ibm.com>
6 * Bugreports.to..: <Linux390@de.ibm.com>
7 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
9 * $Revision: 1.7 $
12 #define MDSK_WRITE_REQ 0x01
13 #define MDSK_READ_REQ 0x02
15 #define INIT_BIO 0x00
16 #define RW_BIO 0x01
17 #define TERM_BIO 0x02
19 #define DEV_CLASS_FBA 0x01
20 #define DEV_CLASS_ECKD 0x04
22 #define DASD_DIAG_LC_INT_CODE 132
23 #define DASD_DIAG_LC_INT_STATUS 133
24 #define DASD_DIAG_LC_INT_PARM_31BIT 128
25 #define DASD_DIAG_LC_INT_PARM_64BIT 4536
26 #define DASD_DIAG_CODE_31BIT 0x03
27 #define DASD_DIAG_CODE_64BIT 0x07
29 #define DASD_DIAG_RWFLAG_ASYNC 0x02
30 #define DASD_DIAG_RWFLAG_NOCACHE 0x01
32 #define DASD_DIAG_FLAGA_FORMAT_64BIT 0x80
34 struct dasd_diag_characteristics {
35 u16 dev_nr;
36 u16 rdc_len;
37 u8 vdev_class;
38 u8 vdev_type;
39 u8 vdev_status;
40 u8 vdev_flags;
41 u8 rdev_class;
42 u8 rdev_type;
43 u8 rdev_model;
44 u8 rdev_features;
45 } __attribute__ ((packed, aligned(4)));
47 struct dasd_diag_cms_label {
48 u8 label_id[4];
49 u8 vol_id[6];
50 u16 version_id;
51 u32 block_size;
52 u32 origin_ptr;
53 u32 usable_count;
54 u32 formatted_count;
55 u32 block_count;
56 u32 used_count;
57 u32 fst_size;
58 u32 fst_count;
59 u8 format_date[6];
60 u8 reserved1[2];
61 u32 disk_offset;
62 u32 map_block;
63 u32 hblk_disp;
64 u32 user_disp;
65 u8 reserved2[4];
66 u8 segment_name[8];
67 } __attribute__ ((packed));
69 #ifdef CONFIG_ARCH_S390X
70 #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT
72 typedef u64 blocknum_t;
73 typedef s64 sblocknum_t;
75 struct dasd_diag_bio {
76 u8 type;
77 u8 status;
78 u8 spare1[2];
79 u32 alet;
80 blocknum_t block_number;
81 u64 buffer;
82 } __attribute__ ((packed, aligned(8)));
84 struct dasd_diag_init_io {
85 u16 dev_nr;
86 u8 flaga;
87 u8 spare1[21];
88 u32 block_size;
89 u8 spare2[4];
90 blocknum_t offset;
91 sblocknum_t start_block;
92 blocknum_t end_block;
93 u8 spare3[8];
94 } __attribute__ ((packed, aligned(8)));
96 struct dasd_diag_rw_io {
97 u16 dev_nr;
98 u8 flaga;
99 u8 spare1[21];
100 u8 key;
101 u8 flags;
102 u8 spare2[2];
103 u32 block_count;
104 u32 alet;
105 u8 spare3[4];
106 u64 interrupt_params;
107 u64 bio_list;
108 u8 spare4[8];
109 } __attribute__ ((packed, aligned(8)));
110 #else /* CONFIG_ARCH_S390X */
111 #define DASD_DIAG_FLAGA_DEFAULT 0x0
113 typedef u32 blocknum_t;
114 typedef s32 sblocknum_t;
116 struct dasd_diag_bio {
117 u8 type;
118 u8 status;
119 u16 spare1;
120 blocknum_t block_number;
121 u32 alet;
122 u32 buffer;
123 } __attribute__ ((packed, aligned(8)));
125 struct dasd_diag_init_io {
126 u16 dev_nr;
127 u8 flaga;
128 u8 spare1[21];
129 u32 block_size;
130 blocknum_t offset;
131 sblocknum_t start_block;
132 blocknum_t end_block;
133 u8 spare2[24];
134 } __attribute__ ((packed, aligned(8)));
136 struct dasd_diag_rw_io {
137 u16 dev_nr;
138 u8 flaga;
139 u8 spare1[21];
140 u8 key;
141 u8 flags;
142 u8 spare2[2];
143 u32 block_count;
144 u32 alet;
145 u32 bio_list;
146 u32 interrupt_params;
147 u8 spare3[20];
148 } __attribute__ ((packed, aligned(8)));
149 #endif /* CONFIG_ARCH_S390X */