diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2010-07-28 06:23:44 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:04:23 -0400 |
commit | f4f5df23bf72208d0c2f1d8be629839924c2f4c2 (patch) | |
tree | 88c41a002e0f9f4470543209047d1111a51a0d06 /drivers/scsi/qla4xxx/ql4_fw.h | |
parent | dbaf82ece08bf93ae5200f03efd87c4f1fc453f1 (diff) |
[SCSI] qla4xxx: Added support for ISP82XX
Signed-off-by: Vikas Chaudhary <Vikas Chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_fw.h')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_fw.h | 139 |
1 files changed, 138 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h index 855226e08665..c94c9ddfb3a6 100644 --- a/drivers/scsi/qla4xxx/ql4_fw.h +++ b/drivers/scsi/qla4xxx/ql4_fw.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #define MAX_PRST_DEV_DB_ENTRIES 64 | 12 | #define MAX_PRST_DEV_DB_ENTRIES 64 |
13 | #define MIN_DISC_DEV_DB_ENTRY MAX_PRST_DEV_DB_ENTRIES | 13 | #define MIN_DISC_DEV_DB_ENTRY MAX_PRST_DEV_DB_ENTRIES |
14 | #define MAX_DEV_DB_ENTRIES 512 | 14 | #define MAX_DEV_DB_ENTRIES 512 |
15 | 15 | ||
16 | /************************************************************************* | 16 | /************************************************************************* |
17 | * | 17 | * |
@@ -37,6 +37,33 @@ struct host_mem_cfg_regs { | |||
37 | __le32 rsrvd1[31]; /* 0x84-0xFF */ | 37 | __le32 rsrvd1[31]; /* 0x84-0xFF */ |
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* | ||
41 | * ISP 82xx I/O Register Set structure definitions. | ||
42 | */ | ||
43 | struct device_reg_82xx { | ||
44 | __le32 req_q_out; /* 0x0000 (R): Request Queue out-Pointer. */ | ||
45 | __le32 reserve1[63]; /* Request Queue out-Pointer. (64 * 4) */ | ||
46 | __le32 rsp_q_in; /* 0x0100 (R/W): Response Queue In-Pointer. */ | ||
47 | __le32 reserve2[63]; /* Response Queue In-Pointer. */ | ||
48 | __le32 rsp_q_out; /* 0x0200 (R/W): Response Queue Out-Pointer. */ | ||
49 | __le32 reserve3[63]; /* Response Queue Out-Pointer. */ | ||
50 | |||
51 | __le32 mailbox_in[8]; /* 0x0300 (R/W): Mail box In registers */ | ||
52 | __le32 reserve4[24]; | ||
53 | __le32 hint; /* 0x0380 (R/W): Host interrupt register */ | ||
54 | #define HINT_MBX_INT_PENDING BIT_0 | ||
55 | __le32 reserve5[31]; | ||
56 | __le32 mailbox_out[8]; /* 0x0400 (R): Mail box Out registers */ | ||
57 | __le32 reserve6[56]; | ||
58 | |||
59 | __le32 host_status; /* Offset 0x500 (R): host status */ | ||
60 | #define HSRX_RISC_MB_INT BIT_0 /* RISC to Host Mailbox interrupt */ | ||
61 | #define HSRX_RISC_IOCB_INT BIT_1 /* RISC to Host IOCB interrupt */ | ||
62 | |||
63 | __le32 host_int; /* Offset 0x0504 (R/W): Interrupt status. */ | ||
64 | #define ISRX_82XX_RISC_INT BIT_0 /* RISC interrupt. */ | ||
65 | }; | ||
66 | |||
40 | /* remote register set (access via PCI memory read/write) */ | 67 | /* remote register set (access via PCI memory read/write) */ |
41 | struct isp_reg { | 68 | struct isp_reg { |
42 | #define MBOX_REG_COUNT 8 | 69 | #define MBOX_REG_COUNT 8 |
@@ -206,6 +233,79 @@ union external_hw_config_reg { | |||
206 | uint32_t Asuint32_t; | 233 | uint32_t Asuint32_t; |
207 | }; | 234 | }; |
208 | 235 | ||
236 | /* 82XX Support start */ | ||
237 | /* 82xx Default FLT Addresses */ | ||
238 | #define FA_FLASH_LAYOUT_ADDR_82 0xFC400 | ||
239 | #define FA_FLASH_DESCR_ADDR_82 0xFC000 | ||
240 | #define FA_BOOT_LOAD_ADDR_82 0x04000 | ||
241 | #define FA_BOOT_CODE_ADDR_82 0x20000 | ||
242 | #define FA_RISC_CODE_ADDR_82 0x40000 | ||
243 | #define FA_GOLD_RISC_CODE_ADDR_82 0x80000 | ||
244 | |||
245 | /* Flash Description Table */ | ||
246 | struct qla_fdt_layout { | ||
247 | uint8_t sig[4]; | ||
248 | uint16_t version; | ||
249 | uint16_t len; | ||
250 | uint16_t checksum; | ||
251 | uint8_t unused1[2]; | ||
252 | uint8_t model[16]; | ||
253 | uint16_t man_id; | ||
254 | uint16_t id; | ||
255 | uint8_t flags; | ||
256 | uint8_t erase_cmd; | ||
257 | uint8_t alt_erase_cmd; | ||
258 | uint8_t wrt_enable_cmd; | ||
259 | uint8_t wrt_enable_bits; | ||
260 | uint8_t wrt_sts_reg_cmd; | ||
261 | uint8_t unprotect_sec_cmd; | ||
262 | uint8_t read_man_id_cmd; | ||
263 | uint32_t block_size; | ||
264 | uint32_t alt_block_size; | ||
265 | uint32_t flash_size; | ||
266 | uint32_t wrt_enable_data; | ||
267 | uint8_t read_id_addr_len; | ||
268 | uint8_t wrt_disable_bits; | ||
269 | uint8_t read_dev_id_len; | ||
270 | uint8_t chip_erase_cmd; | ||
271 | uint16_t read_timeout; | ||
272 | uint8_t protect_sec_cmd; | ||
273 | uint8_t unused2[65]; | ||
274 | }; | ||
275 | |||
276 | /* Flash Layout Table */ | ||
277 | |||
278 | struct qla_flt_location { | ||
279 | uint8_t sig[4]; | ||
280 | uint16_t start_lo; | ||
281 | uint16_t start_hi; | ||
282 | uint8_t version; | ||
283 | uint8_t unused[5]; | ||
284 | uint16_t checksum; | ||
285 | }; | ||
286 | |||
287 | struct qla_flt_header { | ||
288 | uint16_t version; | ||
289 | uint16_t length; | ||
290 | uint16_t checksum; | ||
291 | uint16_t unused; | ||
292 | }; | ||
293 | |||
294 | /* 82xx FLT Regions */ | ||
295 | #define FLT_REG_FDT 0x1a | ||
296 | #define FLT_REG_FLT 0x1c | ||
297 | #define FLT_REG_BOOTLOAD_82 0x72 | ||
298 | #define FLT_REG_FW_82 0x74 | ||
299 | #define FLT_REG_GOLD_FW_82 0x75 | ||
300 | #define FLT_REG_BOOT_CODE_82 0x78 | ||
301 | |||
302 | struct qla_flt_region { | ||
303 | uint32_t code; | ||
304 | uint32_t size; | ||
305 | uint32_t start; | ||
306 | uint32_t end; | ||
307 | }; | ||
308 | |||
209 | /************************************************************************* | 309 | /************************************************************************* |
210 | * | 310 | * |
211 | * Mailbox Commands Structures and Definitions | 311 | * Mailbox Commands Structures and Definitions |
@@ -215,6 +315,10 @@ union external_hw_config_reg { | |||
215 | /* Mailbox command definitions */ | 315 | /* Mailbox command definitions */ |
216 | #define MBOX_CMD_ABOUT_FW 0x0009 | 316 | #define MBOX_CMD_ABOUT_FW 0x0009 |
217 | #define MBOX_CMD_PING 0x000B | 317 | #define MBOX_CMD_PING 0x000B |
318 | #define MBOX_CMD_ENABLE_INTRS 0x0010 | ||
319 | #define INTR_DISABLE 0 | ||
320 | #define INTR_ENABLE 1 | ||
321 | #define MBOX_CMD_STOP_FW 0x0014 | ||
218 | #define MBOX_CMD_ABORT_TASK 0x0015 | 322 | #define MBOX_CMD_ABORT_TASK 0x0015 |
219 | #define MBOX_CMD_LUN_RESET 0x0016 | 323 | #define MBOX_CMD_LUN_RESET 0x0016 |
220 | #define MBOX_CMD_TARGET_WARM_RESET 0x0017 | 324 | #define MBOX_CMD_TARGET_WARM_RESET 0x0017 |
@@ -243,6 +347,7 @@ union external_hw_config_reg { | |||
243 | #define DDB_DS_LOGIN_IN_PROCESS 0x07 | 347 | #define DDB_DS_LOGIN_IN_PROCESS 0x07 |
244 | #define MBOX_CMD_GET_FW_STATE 0x0069 | 348 | #define MBOX_CMD_GET_FW_STATE 0x0069 |
245 | #define MBOX_CMD_GET_INIT_FW_CTRL_BLOCK_DEFAULTS 0x006A | 349 | #define MBOX_CMD_GET_INIT_FW_CTRL_BLOCK_DEFAULTS 0x006A |
350 | #define MBOX_CMD_GET_SYS_INFO 0x0078 | ||
246 | #define MBOX_CMD_RESTORE_FACTORY_DEFAULTS 0x0087 | 351 | #define MBOX_CMD_RESTORE_FACTORY_DEFAULTS 0x0087 |
247 | #define MBOX_CMD_SET_ACB 0x0088 | 352 | #define MBOX_CMD_SET_ACB 0x0088 |
248 | #define MBOX_CMD_GET_ACB 0x0089 | 353 | #define MBOX_CMD_GET_ACB 0x0089 |
@@ -318,6 +423,15 @@ union external_hw_config_reg { | |||
318 | #define MBOX_ASTS_IPSEC_SYSTEM_FATAL_ERROR 0x8022 | 423 | #define MBOX_ASTS_IPSEC_SYSTEM_FATAL_ERROR 0x8022 |
319 | #define MBOX_ASTS_SUBNET_STATE_CHANGE 0x8027 | 424 | #define MBOX_ASTS_SUBNET_STATE_CHANGE 0x8027 |
320 | 425 | ||
426 | /* ACB State Defines */ | ||
427 | #define ACB_STATE_UNCONFIGURED 0x00 | ||
428 | #define ACB_STATE_INVALID 0x01 | ||
429 | #define ACB_STATE_ACQUIRING 0x02 | ||
430 | #define ACB_STATE_TENTATIVE 0x03 | ||
431 | #define ACB_STATE_DEPRICATED 0x04 | ||
432 | #define ACB_STATE_VALID 0x05 | ||
433 | #define ACB_STATE_DISABLING 0x06 | ||
434 | |||
321 | /*************************************************************************/ | 435 | /*************************************************************************/ |
322 | 436 | ||
323 | /* Host Adapter Initialization Control Block (from host) */ | 437 | /* Host Adapter Initialization Control Block (from host) */ |
@@ -558,6 +672,20 @@ struct flash_sys_info { | |||
558 | uint32_t reserved1[39]; /* 170-1ff */ | 672 | uint32_t reserved1[39]; /* 170-1ff */ |
559 | }; /* 200 */ | 673 | }; /* 200 */ |
560 | 674 | ||
675 | struct mbx_sys_info { | ||
676 | uint8_t board_id_str[16]; /* Keep board ID string first */ | ||
677 | /* in this structure for GUI. */ | ||
678 | uint16_t board_id; /* board ID code */ | ||
679 | uint16_t phys_port_cnt; /* number of physical network ports */ | ||
680 | uint16_t port_num; /* network port for this PCI function */ | ||
681 | /* (port 0 is first port) */ | ||
682 | uint8_t mac_addr[6]; /* MAC address for this PCI function */ | ||
683 | uint32_t iscsi_pci_func_cnt; /* number of iSCSI PCI functions */ | ||
684 | uint32_t pci_func; /* this PCI function */ | ||
685 | unsigned char serial_number[16]; /* serial number string */ | ||
686 | uint8_t reserved[16]; | ||
687 | }; | ||
688 | |||
561 | struct crash_record { | 689 | struct crash_record { |
562 | uint16_t fw_major_version; /* 00 - 01 */ | 690 | uint16_t fw_major_version; /* 00 - 01 */ |
563 | uint16_t fw_minor_version; /* 02 - 03 */ | 691 | uint16_t fw_minor_version; /* 02 - 03 */ |
@@ -814,4 +942,13 @@ struct passthru_status { | |||
814 | uint8_t res4[16]; /* 30-3F */ | 942 | uint8_t res4[16]; /* 30-3F */ |
815 | }; | 943 | }; |
816 | 944 | ||
945 | /* | ||
946 | * ISP queue - response queue entry definition. | ||
947 | */ | ||
948 | struct response { | ||
949 | uint8_t data[60]; | ||
950 | uint32_t signature; | ||
951 | #define RESPONSE_PROCESSED 0xDEADDEAD /* Signature */ | ||
952 | }; | ||
953 | |||
817 | #endif /* _QLA4X_FW_H */ | 954 | #endif /* _QLA4X_FW_H */ |