diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2005-09-03 18:58:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:27 -0400 |
commit | fd49f41aa0c125ec649c56a45337b3024d6b1736 (patch) | |
tree | 7400ce289ba77474c3adf6a5a7f1ff8d5215cc28 /drivers/s390/block/dasd_diag.h | |
parent | c6eb7b7703ac4b3401b74f411c8c51ded214bf19 (diff) |
[PATCH] s390: 64 bit diag250 support
Add support for diag 250 access to dasd devices for 64 bit kernels. In
addition fix detach/attach for diag disks. The VM control block needs to get
recreated by a call to mdsk_init_io.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/block/dasd_diag.h')
-rw-r--r-- | drivers/s390/block/dasd_diag.h | 105 |
1 files changed, 94 insertions, 11 deletions
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h index a0c38e303979..b26eb28df4bf 100644 --- a/drivers/s390/block/dasd_diag.h +++ b/drivers/s390/block/dasd_diag.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Bugreports.to..: <Linux390@de.ibm.com> | 6 | * Bugreports.to..: <Linux390@de.ibm.com> |
7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
8 | * | 8 | * |
9 | * $Revision: 1.6 $ | 9 | * $Revision: 1.7 $ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define MDSK_WRITE_REQ 0x01 | 12 | #define MDSK_WRITE_REQ 0x01 |
@@ -19,6 +19,18 @@ | |||
19 | #define DEV_CLASS_FBA 0x01 | 19 | #define DEV_CLASS_FBA 0x01 |
20 | #define DEV_CLASS_ECKD 0x04 | 20 | #define DEV_CLASS_ECKD 0x04 |
21 | 21 | ||
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 | ||
28 | |||
29 | #define DASD_DIAG_RWFLAG_ASYNC 0x02 | ||
30 | #define DASD_DIAG_RWFLAG_NOCACHE 0x01 | ||
31 | |||
32 | #define DASD_DIAG_FLAGA_FORMAT_64BIT 0x80 | ||
33 | |||
22 | struct dasd_diag_characteristics { | 34 | struct dasd_diag_characteristics { |
23 | u16 dev_nr; | 35 | u16 dev_nr; |
24 | u16 rdc_len; | 36 | u16 rdc_len; |
@@ -32,35 +44,106 @@ struct dasd_diag_characteristics { | |||
32 | u8 rdev_features; | 44 | u8 rdev_features; |
33 | } __attribute__ ((packed, aligned(4))); | 45 | } __attribute__ ((packed, aligned(4))); |
34 | 46 | ||
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)); | ||
68 | |||
69 | #ifdef CONFIG_ARCH_S390X | ||
70 | #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT | ||
71 | |||
72 | typedef u64 blocknum_t; | ||
73 | typedef s64 sblocknum_t; | ||
74 | |||
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))); | ||
83 | |||
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))); | ||
95 | |||
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 | ||
112 | |||
113 | typedef u32 blocknum_t; | ||
114 | typedef s32 sblocknum_t; | ||
115 | |||
35 | struct dasd_diag_bio { | 116 | struct dasd_diag_bio { |
36 | u8 type; | 117 | u8 type; |
37 | u8 status; | 118 | u8 status; |
38 | u16 spare1; | 119 | u16 spare1; |
39 | u32 block_number; | 120 | blocknum_t block_number; |
40 | u32 alet; | 121 | u32 alet; |
41 | u32 buffer; | 122 | u32 buffer; |
42 | } __attribute__ ((packed, aligned(8))); | 123 | } __attribute__ ((packed, aligned(8))); |
43 | 124 | ||
44 | struct dasd_diag_init_io { | 125 | struct dasd_diag_init_io { |
45 | u16 dev_nr; | 126 | u16 dev_nr; |
46 | u16 spare1[11]; | 127 | u8 flaga; |
128 | u8 spare1[21]; | ||
47 | u32 block_size; | 129 | u32 block_size; |
48 | u32 offset; | 130 | blocknum_t offset; |
49 | u32 start_block; | 131 | sblocknum_t start_block; |
50 | u32 end_block; | 132 | blocknum_t end_block; |
51 | u32 spare2[6]; | 133 | u8 spare2[24]; |
52 | } __attribute__ ((packed, aligned(8))); | 134 | } __attribute__ ((packed, aligned(8))); |
53 | 135 | ||
54 | struct dasd_diag_rw_io { | 136 | struct dasd_diag_rw_io { |
55 | u16 dev_nr; | 137 | u16 dev_nr; |
56 | u16 spare1[11]; | 138 | u8 flaga; |
139 | u8 spare1[21]; | ||
57 | u8 key; | 140 | u8 key; |
58 | u8 flags; | 141 | u8 flags; |
59 | u16 spare2; | 142 | u8 spare2[2]; |
60 | u32 block_count; | 143 | u32 block_count; |
61 | u32 alet; | 144 | u32 alet; |
62 | u32 bio_list; | 145 | u32 bio_list; |
63 | u32 interrupt_params; | 146 | u32 interrupt_params; |
64 | u32 spare3[5]; | 147 | u8 spare3[20]; |
65 | } __attribute__ ((packed, aligned(8))); | 148 | } __attribute__ ((packed, aligned(8))); |
66 | 149 | #endif /* CONFIG_ARCH_S390X */ | |