aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfi.h')
-rw-r--r--drivers/scsi/bfa/bfi.h42
1 files changed, 40 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h
index 37bd2564e83b..9ef91f907dec 100644
--- a/drivers/scsi/bfa/bfi.h
+++ b/drivers/scsi/bfa/bfi.h
@@ -46,6 +46,7 @@
46 */ 46 */
47#define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */ 47#define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */
48#define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) 48#define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32))
49#define BFI_FLASH_IMAGE_SZ 0x100000
49 50
50/* 51/*
51 * Msg header common to all msgs 52 * Msg header common to all msgs
@@ -324,7 +325,29 @@ struct bfi_ioc_getattr_reply_s {
324#define BFI_IOC_TRC_ENTS 256 325#define BFI_IOC_TRC_ENTS 256
325 326
326#define BFI_IOC_FW_SIGNATURE (0xbfadbfad) 327#define BFI_IOC_FW_SIGNATURE (0xbfadbfad)
328#define BFA_IOC_FW_INV_SIGN (0xdeaddead)
327#define BFI_IOC_MD5SUM_SZ 4 329#define BFI_IOC_MD5SUM_SZ 4
330
331struct bfi_ioc_fwver_s {
332#ifdef __BIG_ENDIAN
333 uint8_t patch;
334 uint8_t maint;
335 uint8_t minor;
336 uint8_t major;
337 uint8_t rsvd[2];
338 uint8_t build;
339 uint8_t phase;
340#else
341 uint8_t major;
342 uint8_t minor;
343 uint8_t maint;
344 uint8_t patch;
345 uint8_t phase;
346 uint8_t build;
347 uint8_t rsvd[2];
348#endif
349};
350
328struct bfi_ioc_image_hdr_s { 351struct bfi_ioc_image_hdr_s {
329 u32 signature; /* constant signature */ 352 u32 signature; /* constant signature */
330 u8 asic_gen; /* asic generation */ 353 u8 asic_gen; /* asic generation */
@@ -333,10 +356,18 @@ struct bfi_ioc_image_hdr_s {
333 u8 port1_mode; /* device mode for port 1 */ 356 u8 port1_mode; /* device mode for port 1 */
334 u32 exec; /* exec vector */ 357 u32 exec; /* exec vector */
335 u32 bootenv; /* fimware boot env */ 358 u32 bootenv; /* fimware boot env */
336 u32 rsvd_b[4]; 359 u32 rsvd_b[2];
360 struct bfi_ioc_fwver_s fwver;
337 u32 md5sum[BFI_IOC_MD5SUM_SZ]; 361 u32 md5sum[BFI_IOC_MD5SUM_SZ];
338}; 362};
339 363
364enum bfi_ioc_img_ver_cmp_e {
365 BFI_IOC_IMG_VER_INCOMP,
366 BFI_IOC_IMG_VER_OLD,
367 BFI_IOC_IMG_VER_SAME,
368 BFI_IOC_IMG_VER_BETTER
369};
370
340#define BFI_FWBOOT_DEVMODE_OFF 4 371#define BFI_FWBOOT_DEVMODE_OFF 4
341#define BFI_FWBOOT_TYPE_OFF 8 372#define BFI_FWBOOT_TYPE_OFF 8
342#define BFI_FWBOOT_ENV_OFF 12 373#define BFI_FWBOOT_ENV_OFF 12
@@ -346,6 +377,12 @@ struct bfi_ioc_image_hdr_s {
346 ((u32)(__p0_mode)) << 8 | \ 377 ((u32)(__p0_mode)) << 8 | \
347 ((u32)(__p1_mode))) 378 ((u32)(__p1_mode)))
348 379
380enum bfi_fwboot_type {
381 BFI_FWBOOT_TYPE_NORMAL = 0,
382 BFI_FWBOOT_TYPE_FLASH = 1,
383 BFI_FWBOOT_TYPE_MEMTEST = 2,
384};
385
349#define BFI_FWBOOT_TYPE_NORMAL 0 386#define BFI_FWBOOT_TYPE_NORMAL 0
350#define BFI_FWBOOT_TYPE_MEMTEST 2 387#define BFI_FWBOOT_TYPE_MEMTEST 2
351#define BFI_FWBOOT_ENV_OS 0 388#define BFI_FWBOOT_ENV_OS 0
@@ -1107,7 +1144,8 @@ struct bfi_diag_dport_scn_teststart_s {
1107 wwn_t pwwn; /* switch port wwn. 8 bytes */ 1144 wwn_t pwwn; /* switch port wwn. 8 bytes */
1108 wwn_t nwwn; /* switch node wwn. 8 bytes */ 1145 wwn_t nwwn; /* switch node wwn. 8 bytes */
1109 u8 type; /* bfa_diag_dport_test_type_e */ 1146 u8 type; /* bfa_diag_dport_test_type_e */
1110 u8 rsvd[3]; 1147 u8 mode; /* bfa_diag_dport_test_opmode */
1148 u8 rsvd[2];
1111 u32 numfrm; /* from switch uint in 1M */ 1149 u32 numfrm; /* from switch uint in 1M */
1112}; 1150};
1113 1151