diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_fw.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_fw.h | 173 |
1 files changed, 170 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 9337e138ed63..078f2a15f40b 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * QLogic Fibre Channel HBA Driver | 2 | * QLogic Fibre Channel HBA Driver |
3 | * Copyright (c) 2003-2005 QLogic Corporation | 3 | * Copyright (c) 2003-2008 QLogic Corporation |
4 | * | 4 | * |
5 | * See LICENSE.qla2xxx for copyright and licensing details. | 5 | * See LICENSE.qla2xxx for copyright and licensing details. |
6 | */ | 6 | */ |
@@ -719,7 +719,7 @@ struct tsk_mgmt_entry { | |||
719 | 719 | ||
720 | uint16_t timeout; /* Command timeout. */ | 720 | uint16_t timeout; /* Command timeout. */ |
721 | 721 | ||
722 | uint8_t lun[8]; /* FCP LUN (BE). */ | 722 | struct scsi_lun lun; /* FCP LUN (BE). */ |
723 | 723 | ||
724 | uint32_t control_flags; /* Control Flags. */ | 724 | uint32_t control_flags; /* Control Flags. */ |
725 | #define TCF_NOTMCMD_TO_TARGET BIT_31 | 725 | #define TCF_NOTMCMD_TO_TARGET BIT_31 |
@@ -793,7 +793,19 @@ struct device_reg_24xx { | |||
793 | #define FA_VPD_NVRAM_ADDR 0x48000 | 793 | #define FA_VPD_NVRAM_ADDR 0x48000 |
794 | #define FA_FEATURE_ADDR 0x4C000 | 794 | #define FA_FEATURE_ADDR 0x4C000 |
795 | #define FA_FLASH_DESCR_ADDR 0x50000 | 795 | #define FA_FLASH_DESCR_ADDR 0x50000 |
796 | #define FA_HW_EVENT_ADDR 0x54000 | 796 | #define FA_HW_EVENT0_ADDR 0x54000 |
797 | #define FA_HW_EVENT1_ADDR 0x54200 | ||
798 | #define FA_HW_EVENT_SIZE 0x200 | ||
799 | #define FA_HW_EVENT_ENTRY_SIZE 4 | ||
800 | /* | ||
801 | * Flash Error Log Event Codes. | ||
802 | */ | ||
803 | #define HW_EVENT_RESET_ERR 0xF00B | ||
804 | #define HW_EVENT_ISP_ERR 0xF020 | ||
805 | #define HW_EVENT_PARITY_ERR 0xF022 | ||
806 | #define HW_EVENT_NVRAM_CHKSUM_ERR 0xF023 | ||
807 | #define HW_EVENT_FLASH_FW_ERR 0xF024 | ||
808 | |||
797 | #define FA_BOOT_LOG_ADDR 0x58000 | 809 | #define FA_BOOT_LOG_ADDR 0x58000 |
798 | #define FA_FW_DUMP0_ADDR 0x60000 | 810 | #define FA_FW_DUMP0_ADDR 0x60000 |
799 | #define FA_FW_DUMP1_ADDR 0x70000 | 811 | #define FA_FW_DUMP1_ADDR 0x70000 |
@@ -1174,4 +1186,159 @@ struct vf_evfp_entry_24xx { | |||
1174 | }; | 1186 | }; |
1175 | 1187 | ||
1176 | /* END MID Support ***********************************************************/ | 1188 | /* END MID Support ***********************************************************/ |
1189 | |||
1190 | /* Flash Description Table ***************************************************/ | ||
1191 | |||
1192 | struct qla_fdt_layout { | ||
1193 | uint8_t sig[4]; | ||
1194 | uint16_t version; | ||
1195 | uint16_t len; | ||
1196 | uint16_t checksum; | ||
1197 | uint8_t unused1[2]; | ||
1198 | uint8_t model[16]; | ||
1199 | uint16_t man_id; | ||
1200 | uint16_t id; | ||
1201 | uint8_t flags; | ||
1202 | uint8_t erase_cmd; | ||
1203 | uint8_t alt_erase_cmd; | ||
1204 | uint8_t wrt_enable_cmd; | ||
1205 | uint8_t wrt_enable_bits; | ||
1206 | uint8_t wrt_sts_reg_cmd; | ||
1207 | uint8_t unprotect_sec_cmd; | ||
1208 | uint8_t read_man_id_cmd; | ||
1209 | uint32_t block_size; | ||
1210 | uint32_t alt_block_size; | ||
1211 | uint32_t flash_size; | ||
1212 | uint32_t wrt_enable_data; | ||
1213 | uint8_t read_id_addr_len; | ||
1214 | uint8_t wrt_disable_bits; | ||
1215 | uint8_t read_dev_id_len; | ||
1216 | uint8_t chip_erase_cmd; | ||
1217 | uint16_t read_timeout; | ||
1218 | uint8_t protect_sec_cmd; | ||
1219 | uint8_t unused2[65]; | ||
1220 | }; | ||
1221 | |||
1222 | /* 84XX Support **************************************************************/ | ||
1223 | |||
1224 | #define MBA_ISP84XX_ALERT 0x800f /* Alert Notification. */ | ||
1225 | #define A84_PANIC_RECOVERY 0x1 | ||
1226 | #define A84_OP_LOGIN_COMPLETE 0x2 | ||
1227 | #define A84_DIAG_LOGIN_COMPLETE 0x3 | ||
1228 | #define A84_GOLD_LOGIN_COMPLETE 0x4 | ||
1229 | |||
1230 | #define MBC_ISP84XX_RESET 0x3a /* Reset. */ | ||
1231 | |||
1232 | #define FSTATE_REMOTE_FC_DOWN BIT_0 | ||
1233 | #define FSTATE_NSL_LINK_DOWN BIT_1 | ||
1234 | #define FSTATE_IS_DIAG_FW BIT_2 | ||
1235 | #define FSTATE_LOGGED_IN BIT_3 | ||
1236 | #define FSTATE_WAITING_FOR_VERIFY BIT_4 | ||
1237 | |||
1238 | #define VERIFY_CHIP_IOCB_TYPE 0x1B | ||
1239 | struct verify_chip_entry_84xx { | ||
1240 | uint8_t entry_type; | ||
1241 | uint8_t entry_count; | ||
1242 | uint8_t sys_defined; | ||
1243 | uint8_t entry_status; | ||
1244 | |||
1245 | uint32_t handle; | ||
1246 | |||
1247 | uint16_t options; | ||
1248 | #define VCO_DONT_UPDATE_FW BIT_0 | ||
1249 | #define VCO_FORCE_UPDATE BIT_1 | ||
1250 | #define VCO_DONT_RESET_UPDATE BIT_2 | ||
1251 | #define VCO_DIAG_FW BIT_3 | ||
1252 | #define VCO_END_OF_DATA BIT_14 | ||
1253 | #define VCO_ENABLE_DSD BIT_15 | ||
1254 | |||
1255 | uint16_t reserved_1; | ||
1256 | |||
1257 | uint16_t data_seg_cnt; | ||
1258 | uint16_t reserved_2[3]; | ||
1259 | |||
1260 | uint32_t fw_ver; | ||
1261 | uint32_t exchange_address; | ||
1262 | |||
1263 | uint32_t reserved_3[3]; | ||
1264 | uint32_t fw_size; | ||
1265 | uint32_t fw_seq_size; | ||
1266 | uint32_t relative_offset; | ||
1267 | |||
1268 | uint32_t dseg_address[2]; | ||
1269 | uint32_t dseg_length; | ||
1270 | }; | ||
1271 | |||
1272 | struct verify_chip_rsp_84xx { | ||
1273 | uint8_t entry_type; | ||
1274 | uint8_t entry_count; | ||
1275 | uint8_t sys_defined; | ||
1276 | uint8_t entry_status; | ||
1277 | |||
1278 | uint32_t handle; | ||
1279 | |||
1280 | uint16_t comp_status; | ||
1281 | #define CS_VCS_CHIP_FAILURE 0x3 | ||
1282 | #define CS_VCS_BAD_EXCHANGE 0x8 | ||
1283 | #define CS_VCS_SEQ_COMPLETEi 0x40 | ||
1284 | |||
1285 | uint16_t failure_code; | ||
1286 | #define VFC_CHECKSUM_ERROR 0x1 | ||
1287 | #define VFC_INVALID_LEN 0x2 | ||
1288 | #define VFC_ALREADY_IN_PROGRESS 0x8 | ||
1289 | |||
1290 | uint16_t reserved_1[4]; | ||
1291 | |||
1292 | uint32_t fw_ver; | ||
1293 | uint32_t exchange_address; | ||
1294 | |||
1295 | uint32_t reserved_2[6]; | ||
1296 | }; | ||
1297 | |||
1298 | #define ACCESS_CHIP_IOCB_TYPE 0x2B | ||
1299 | struct access_chip_84xx { | ||
1300 | uint8_t entry_type; | ||
1301 | uint8_t entry_count; | ||
1302 | uint8_t sys_defined; | ||
1303 | uint8_t entry_status; | ||
1304 | |||
1305 | uint32_t handle; | ||
1306 | |||
1307 | uint16_t options; | ||
1308 | #define ACO_DUMP_MEMORY 0x0 | ||
1309 | #define ACO_LOAD_MEMORY 0x1 | ||
1310 | #define ACO_CHANGE_CONFIG_PARAM 0x2 | ||
1311 | #define ACO_REQUEST_INFO 0x3 | ||
1312 | |||
1313 | uint16_t reserved1; | ||
1314 | |||
1315 | uint16_t dseg_count; | ||
1316 | uint16_t reserved2[3]; | ||
1317 | |||
1318 | uint32_t parameter1; | ||
1319 | uint32_t parameter2; | ||
1320 | uint32_t parameter3; | ||
1321 | |||
1322 | uint32_t reserved3[3]; | ||
1323 | uint32_t total_byte_cnt; | ||
1324 | uint32_t reserved4; | ||
1325 | |||
1326 | uint32_t dseg_address[2]; | ||
1327 | uint32_t dseg_length; | ||
1328 | }; | ||
1329 | |||
1330 | struct access_chip_rsp_84xx { | ||
1331 | uint8_t entry_type; | ||
1332 | uint8_t entry_count; | ||
1333 | uint8_t sys_defined; | ||
1334 | uint8_t entry_status; | ||
1335 | |||
1336 | uint32_t handle; | ||
1337 | |||
1338 | uint16_t comp_status; | ||
1339 | uint16_t failure_code; | ||
1340 | uint32_t residual_count; | ||
1341 | |||
1342 | uint32_t reserved[12]; | ||
1343 | }; | ||
1177 | #endif | 1344 | #endif |