OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [block/] [ida_cmd.h] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
/*
2
 *    Disk Array driver for Compaq SMART2 Controllers
3
 *    Copyright 1998 Compaq Computer Corporation
4
 *
5
 *    This program is free software; you can redistribute it and/or modify
6
 *    it under the terms of the GNU General Public License as published by
7
 *    the Free Software Foundation; either version 2 of the License, or
8
 *    (at your option) any later version.
9
 *
10
 *    This program is distributed in the hope that it will be useful,
11
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
13
 *    NON INFRINGEMENT.  See the GNU General Public License for more details.
14
 *
15
 *    You should have received a copy of the GNU General Public License
16
 *    along with this program; if not, write to the Free Software
17
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
 *
19
 *    Questions/Comments/Bugfixes to arrays@compaq.com
20
 *
21
 *    If you want to make changes, improve or add functionality to this
22
 *    driver, you'll probably need the Compaq Array Controller Interface
23
 *    Specificiation (Document number ECG086/1198)
24
 */
25
#ifndef ARRAYCMD_H
26
#define ARRAYCMD_H
27
 
28
#include <asm/types.h>
29
#if 0
30
#include <linux/blkdev.h>
31
#endif
32
 
33
 
34
#define COMMAND_FIFO            0x04
35
#define COMMAND_COMPLETE_FIFO   0x08
36
#define INTR_MASK               0x0C
37
#define INTR_STATUS             0x10
38
#define INTR_PENDING            0x14
39
 
40
#define FIFO_NOT_EMPTY          0x01
41
#define FIFO_NOT_FULL           0x02
42
 
43
#define BIG_PROBLEM             0x40
44
#define LOG_NOT_CONF            2
45
 
46
#pragma pack(1)
47
typedef struct {
48
        __u32   size;
49
        __u32   addr;
50
} sg_t;
51
 
52
#define RCODE_NONFATAL  0x02
53
#define RCODE_FATAL     0x04
54
#define RCODE_INVREQ    0x10
55
typedef struct {
56
        __u16   next;
57
        __u8    cmd;
58
        __u8    rcode;
59
        __u32   blk;
60
        __u16   blk_cnt;
61
        __u8    sg_cnt;
62
        __u8    reserved;
63
} rhdr_t;
64
 
65
#define SG_MAX                  32
66
typedef struct {
67
        rhdr_t  hdr;
68
        sg_t    sg[SG_MAX];
69
        __u32   bp;
70
} rblk_t;
71
 
72
typedef struct {
73
        __u8    unit;
74
        __u8    prio;
75
        __u16   size;
76
} chdr_t;
77
 
78
#define CMD_RWREQ       0x00
79
#define CMD_IOCTL_PEND  0x01
80
#define CMD_IOCTL_DONE  0x02
81
 
82
typedef struct cmdlist {
83
        chdr_t  hdr;
84
        rblk_t  req;
85
        __u32   size;
86
        int     retry_cnt;
87
        __u32   busaddr;
88
        int     ctlr;
89
        struct cmdlist *prev;
90
        struct cmdlist *next;
91
        struct buffer_head *bh;
92
        int type;
93
} cmdlist_t;
94
 
95
#define ID_CTLR         0x11
96
typedef struct {
97
        __u8    nr_drvs;
98
        __u32   cfg_sig;
99
        __u8    firm_rev[4];
100
        __u8    rom_rev[4];
101
        __u8    hw_rev;
102
        __u32   bb_rev;
103
        __u32   drv_present_map;
104
        __u32   ext_drv_map;
105
        __u32   board_id;
106
        __u8    cfg_error;
107
        __u32   non_disk_bits;
108
        __u8    bad_ram_addr;
109
        __u8    cpu_rev;
110
        __u8    pdpi_rev;
111
        __u8    epic_rev;
112
        __u8    wcxc_rev;
113
        __u8    marketing_rev;
114
        __u8    ctlr_flags;
115
        __u8    host_flags;
116
        __u8    expand_dis;
117
        __u8    scsi_chips;
118
        __u32   max_req_blocks;
119
        __u32   ctlr_clock;
120
        __u8    drvs_per_bus;
121
        __u16   big_drv_present_map[8];
122
        __u16   big_ext_drv_map[8];
123
        __u16   big_non_disk_map[8];
124
        __u16   task_flags;
125
        __u8    icl_bus;
126
        __u8    red_modes;
127
        __u8    cur_red_mode;
128
        __u8    red_ctlr_stat;
129
        __u8    red_fail_reason;
130
        __u8    reserved[403];
131
} id_ctlr_t;
132
 
133
typedef struct {
134
        __u16   cyl;
135
        __u8    heads;
136
        __u8    xsig;
137
        __u8    psectors;
138
        __u16   wpre;
139
        __u8    maxecc;
140
        __u8    drv_ctrl;
141
        __u16   pcyls;
142
        __u8    pheads;
143
        __u16   landz;
144
        __u8    sect_per_track;
145
        __u8    cksum;
146
} drv_param_t;
147
 
148
#define ID_LOG_DRV      0x10
149
typedef struct {
150
        __u16   blk_size;
151
        __u32   nr_blks;
152
        drv_param_t drv;
153
        __u8    fault_tol;
154
        __u8    reserved;
155
        __u8    bios_disable;
156
} id_log_drv_t;
157
 
158
#define ID_LOG_DRV_EXT  0x18
159
typedef struct {
160
        __u32   log_drv_id;
161
        __u8    log_drv_label[64];
162
        __u8    reserved[418];
163
} id_log_drv_ext_t;
164
 
165
#define SENSE_LOG_DRV_STAT      0x12
166
typedef struct {
167
        __u8    status;
168
        __u32   fail_map;
169
        __u16   read_err[32];
170
        __u16   write_err[32];
171
        __u8    drv_err_data[256];
172
        __u8    drq_timeout[32];
173
        __u32   blks_to_recover;
174
        __u8    drv_recovering;
175
        __u16   remap_cnt[32];
176
        __u32   replace_drv_map;
177
        __u32   act_spare_map;
178
        __u8    spare_stat;
179
        __u8    spare_repl_map[32];
180
        __u32   repl_ok_map;
181
        __u8    media_exch;
182
        __u8    cache_fail;
183
        __u8    expn_fail;
184
        __u8    unit_flags;
185
        __u16   big_fail_map[8];
186
        __u16   big_remap_map[8];
187
        __u16   big_repl_map[8];
188
        __u16   big_act_spare_map[8];
189
        __u8    big_spar_repl_map[128];
190
        __u16   big_repl_ok_map[8];
191
        __u8    big_drv_rebuild;
192
        __u8    reserved[36];
193
} sense_log_drv_stat_t;
194
 
195
#define START_RECOVER           0x13
196
 
197
#define ID_PHYS_DRV             0x15
198
typedef struct {
199
        __u8    scsi_bus;
200
        __u8    scsi_id;
201
        __u16   blk_size;
202
        __u32   nr_blks;
203
        __u32   rsvd_blks;
204
        __u8    drv_model[40];
205
        __u8    drv_sn[40];
206
        __u8    drv_fw[8];
207
        __u8    scsi_iq_bits;
208
        __u8    compaq_drv_stmp;
209
        __u8    last_fail;
210
        __u8    phys_drv_flags;
211
        __u8    phys_drv_flags1;
212
        __u8    scsi_lun;
213
        __u8    phys_drv_flags2;
214
        __u8    reserved;
215
        __u32   spi_speed_rules;
216
        __u8    phys_connector[2];
217
        __u8    phys_box_on_bus;
218
        __u8    phys_bay_in_box;
219
} id_phys_drv_t;
220
 
221
#define BLINK_DRV_LEDS          0x16
222
typedef struct {
223
        __u32   blink_duration;
224
        __u32   reserved;
225
        __u8    blink[256];
226
        __u8    reserved1[248];
227
} blink_drv_leds_t;
228
 
229
#define SENSE_BLINK_LEDS        0x17
230
typedef struct {
231
        __u32   blink_duration;
232
        __u32   btime_elap;
233
        __u8    blink[256];
234
        __u8    reserved1[248];
235
} sense_blink_leds_t;
236
 
237
#define IDA_READ                0x20
238
#define IDA_WRITE               0x30
239
#define IDA_WRITE_MEDIA         0x31
240
#define RESET_TO_DIAG           0x40
241
#define DIAG_PASS_THRU          0x41
242
 
243
#define SENSE_CONFIG            0x50
244
#define SET_CONFIG              0x51
245
typedef struct {
246
        __u32   cfg_sig;
247
        __u16   compat_port;
248
        __u8    data_dist_mode;
249
        __u8    surf_an_ctrl;
250
        __u16   ctlr_phys_drv;
251
        __u16   log_unit_phys_drv;
252
        __u16   fault_tol_mode;
253
        __u8    phys_drv_param[16];
254
        drv_param_t drv;
255
        __u32   drv_asgn_map;
256
        __u16   dist_factor;
257
        __u32   spare_asgn_map;
258
        __u8    reserved[6];
259
        __u16   os;
260
        __u8    ctlr_order;
261
        __u8    extra_info;
262
        __u32   data_offs;
263
        __u8    parity_backedout_write_drvs;
264
        __u8    parity_dist_mode;
265
        __u8    parity_shift_fact;
266
        __u8    bios_disable_flag;
267
        __u32   blks_on_vol;
268
        __u32   blks_per_drv;
269
        __u8    scratch[16];
270
        __u16   big_drv_map[8];
271
        __u16   big_spare_map[8];
272
        __u8    ss_source_vol;
273
        __u8    mix_drv_cap_range;
274
        struct {
275
                __u16   big_drv_map[8];
276
                __u32   blks_per_drv;
277
                __u16   fault_tol_mode;
278
                __u16   dist_factor;
279
        } MDC_range[4];
280
        __u8    reserved1[248];
281
} config_t;
282
 
283
#define BYPASS_VOL_STATE        0x52
284
#define SS_CREATE_VOL           0x53
285
#define CHANGE_CONFIG           0x54
286
#define SENSE_ORIG_CONF         0x55
287
#define REORDER_LOG_DRV         0x56
288
typedef struct {
289
        __u8    old_units[32];
290
} reorder_log_drv_t;
291
 
292
#define LABEL_LOG_DRV           0x57
293
typedef struct {
294
        __u8    log_drv_label[64];
295
} label_log_drv_t;
296
 
297
#define SS_TO_VOL               0x58
298
 
299
#define SET_SURF_DELAY          0x60
300
typedef struct {
301
        __u16   delay;
302
        __u8    reserved[510];
303
} surf_delay_t;
304
 
305
#define SET_OVERHEAT_DELAY      0x61
306
typedef struct {
307
        __u16   delay;
308
} overhead_delay_t;
309
 
310
#define SET_MP_DELAY
311
typedef struct {
312
        __u16   delay;
313
        __u8    reserved[510];
314
} mp_delay_t;
315
 
316
#define PASSTHRU_A      0x91
317
typedef struct {
318
        __u8    target;
319
        __u8    bus;
320
        __u8    lun;
321
        __u32   timeout;
322
        __u32   flags;
323
        __u8    status;
324
        __u8    error;
325
        __u8    cdb_len;
326
        __u8    sense_error;
327
        __u8    sense_key;
328
        __u32   sense_info;
329
        __u8    sense_code;
330
        __u8    sense_qual;
331
        __u8    residual;
332
        __u8    reserved[4];
333
        __u8    cdb[12];
334
} scsi_param_t;
335
 
336
#pragma pack()  
337
 
338
#endif /* ARRAYCMD_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.