2 * Disk Array driver for Compaq SMART2 Controllers
3 * Copyright 1998 Compaq Computer Corporation
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.
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.
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.
19 * Questions/Comments/Bugfixes to arrays@compaq.com
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)
28 #include <asm/types.h>
30 #include <linux/blkdev.h>
33 /* for the Smart Array 42XX cards */
34 #define S42XX_REQUEST_PORT_OFFSET 0x40
35 #define S42XX_REPLY_INTR_MASK_OFFSET 0x34
36 #define S42XX_REPLY_PORT_OFFSET 0x44
37 #define S42XX_INTR_STATUS 0x30
39 #define S42XX_INTR_OFF 0x08
40 #define S42XX_INTR_PENDING 0x08
42 #define COMMAND_FIFO 0x04
43 #define COMMAND_COMPLETE_FIFO 0x08
44 #define INTR_MASK 0x0C
45 #define INTR_STATUS 0x10
46 #define INTR_PENDING 0x14
48 #define FIFO_NOT_EMPTY 0x01
49 #define FIFO_NOT_FULL 0x02
51 #define BIG_PROBLEM 0x40
52 #define LOG_NOT_CONF 2
60 #define RCODE_NONFATAL 0x02
61 #define RCODE_FATAL 0x04
62 #define RCODE_INVREQ 0x10
86 #define CMD_RWREQ 0x00
87 #define CMD_IOCTL_PEND 0x01
88 #define CMD_IOCTL_DONE 0x02
90 typedef struct cmdlist
{
99 struct buffer_head
*bh
;
111 __u32 drv_present_map
;
126 __u32 max_req_blocks
;
129 __u16 big_drv_present_map
[8];
130 __u16 big_ext_drv_map
[8];
131 __u16 big_non_disk_map
[8];
137 __u8 red_fail_reason
;
156 #define ID_LOG_DRV 0x10
166 #define ID_LOG_DRV_EXT 0x18
169 __u8 log_drv_label
[64];
173 #define SENSE_LOG_DRV_STAT 0x12
179 __u8 drv_err_data
[256];
180 __u8 drq_timeout
[32];
181 __u32 blks_to_recover
;
184 __u32 replace_drv_map
;
187 __u8 spare_repl_map
[32];
193 __u16 big_fail_map
[8];
194 __u16 big_remap_map
[128];
195 __u16 big_repl_map
[8];
196 __u16 big_act_spare_map
[8];
197 __u8 big_spar_repl_map
[128];
198 __u16 big_repl_ok_map
[8];
199 __u8 big_drv_rebuild
;
201 } sense_log_drv_stat_t
;
203 #define START_RECOVER 0x13
205 #define ID_PHYS_DRV 0x15
216 __u8 compaq_drv_stmp
;
219 __u8 phys_drv_flags1
;
221 __u8 phys_drv_flags2
;
223 __u32 spi_speed_rules
;
224 __u8 phys_connector
[2];
225 __u8 phys_box_on_bus
;
226 __u8 phys_bay_in_box
;
229 #define BLINK_DRV_LEDS 0x16
231 __u32 blink_duration
;
237 #define SENSE_BLINK_LEDS 0x17
239 __u32 blink_duration
;
243 } sense_blink_leds_t
;
245 #define IDA_READ 0x20
246 #define IDA_WRITE 0x30
247 #define IDA_WRITE_MEDIA 0x31
248 #define RESET_TO_DIAG 0x40
249 #define DIAG_PASS_THRU 0x41
251 #define SENSE_CONFIG 0x50
252 #define SET_CONFIG 0x51
259 __u16 log_unit_phys_drv
;
260 __u16 fault_tol_mode
;
261 __u8 phys_drv_param
[16];
265 __u32 spare_asgn_map
;
271 __u8 parity_backedout_write_drvs
;
272 __u8 parity_dist_mode
;
273 __u8 parity_shift_fact
;
274 __u8 bios_disable_flag
;
278 __u16 big_drv_map
[8];
279 __u16 big_spare_map
[8];
281 __u8 mix_drv_cap_range
;
283 __u16 big_drv_map
[8];
285 __u16 fault_tol_mode
;
291 #define BYPASS_VOL_STATE 0x52
292 #define SS_CREATE_VOL 0x53
293 #define CHANGE_CONFIG 0x54
294 #define SENSE_ORIG_CONF 0x55
295 #define REORDER_LOG_DRV 0x56
300 #define LABEL_LOG_DRV 0x57
302 __u8 log_drv_label
[64];
305 #define SS_TO_VOL 0x58
307 #define SET_SURF_DELAY 0x60
313 #define SET_OVERHEAT_DELAY 0x61
324 #define PASSTHRU_A 0x91
344 #define RESUME_BACKGROUND_ACTIVITY 0x99
347 #endif /* ARRAYCMD_H */