blob: e84a5468d8107ed9711b340da072535b0c4536e0 [file] [log] [blame]
Horst Hummel138c0142006-06-29 14:58:12 +02001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * 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 Carstensa53c8fa2012-07-20 11:15:04 +02006 * Copyright IBM Corp. 1999, 2000
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 */
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 Hummelfd49f412005-09-03 15:58:00 -070020#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 Torvalds1da177e2005-04-16 15:20:36 -070028struct 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 Hummelfd49f412005-09-03 15:58:00 -070041#define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT
42
43typedef u64 blocknum_t;
44typedef s64 sblocknum_t;
45
46struct dasd_diag_bio {
47 u8 type;
48 u8 status;
49 u8 spare1[2];
50 u32 alet;
51 blocknum_t block_number;
Peter Oberparleiter86b368a2005-11-07 00:59:08 -080052 void *buffer;
Horst Hummelfd49f412005-09-03 15:58:00 -070053} __attribute__ ((packed, aligned(8)));
54
55struct 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
67struct 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 Oberparleiter86b368a2005-11-07 00:59:08 -080078 struct dasd_diag_bio *bio_list;
Horst Hummelfd49f412005-09-03 15:58:00 -070079 u8 spare4[8];
80} __attribute__ ((packed, aligned(8)));