aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfa_defs.h')
-rw-r--r--drivers/scsi/bfa/bfa_defs.h106
1 files changed, 81 insertions, 25 deletions
diff --git a/drivers/scsi/bfa/bfa_defs.h b/drivers/scsi/bfa/bfa_defs.h
index 715d9f9fe33..97ad07c4aee 100644
--- a/drivers/scsi/bfa/bfa_defs.h
+++ b/drivers/scsi/bfa/bfa_defs.h
@@ -133,6 +133,7 @@ enum bfa_status {
133 BFA_STATUS_SFP_UNSUPP = 10, /* Unsupported SFP - Replace SFP */ 133 BFA_STATUS_SFP_UNSUPP = 10, /* Unsupported SFP - Replace SFP */
134 BFA_STATUS_UNKNOWN_VFID = 11, /* VF_ID not found */ 134 BFA_STATUS_UNKNOWN_VFID = 11, /* VF_ID not found */
135 BFA_STATUS_DEVBUSY = 13, /* Device busy - Retry operation */ 135 BFA_STATUS_DEVBUSY = 13, /* Device busy - Retry operation */
136 BFA_STATUS_FLASH_BAD_LEN = 17, /* Flash bad length */
136 BFA_STATUS_UNKNOWN_LWWN = 18, /* LPORT PWWN not found */ 137 BFA_STATUS_UNKNOWN_LWWN = 18, /* LPORT PWWN not found */
137 BFA_STATUS_UNKNOWN_RWWN = 19, /* RPORT PWWN not found */ 138 BFA_STATUS_UNKNOWN_RWWN = 19, /* RPORT PWWN not found */
138 BFA_STATUS_VPORT_EXISTS = 21, /* VPORT already exists */ 139 BFA_STATUS_VPORT_EXISTS = 21, /* VPORT already exists */
@@ -384,31 +385,39 @@ struct bfa_ioc_attr_s {
384 * All numerical fields are in big-endian format. 385 * All numerical fields are in big-endian format.
385 */ 386 */
386struct bfa_mfg_block_s { 387struct bfa_mfg_block_s {
387 u8 version; /* manufacturing block version */ 388 u8 version; /*!< manufacturing block version */
388 u8 mfg_sig[3]; /* characters 'M', 'F', 'G' */ 389 u8 mfg_sig[3]; /*!< characters 'M', 'F', 'G' */
389 u16 mfgsize; /* mfg block size */ 390 u16 mfgsize; /*!< mfg block size */
390 u16 u16_chksum; /* old u16 checksum */ 391 u16 u16_chksum; /*!< old u16 checksum */
391 char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)]; 392 char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)];
392 char brcd_partnum[STRSZ(BFA_MFG_PARTNUM_SIZE)]; 393 char brcd_partnum[STRSZ(BFA_MFG_PARTNUM_SIZE)];
393 u8 mfg_day; /* manufacturing day */ 394 u8 mfg_day; /*!< manufacturing day */
394 u8 mfg_month; /* manufacturing month */ 395 u8 mfg_month; /*!< manufacturing month */
395 u16 mfg_year; /* manufacturing year */ 396 u16 mfg_year; /*!< manufacturing year */
396 wwn_t mfg_wwn; /* wwn base for this adapter */ 397 wwn_t mfg_wwn; /*!< wwn base for this adapter */
397 u8 num_wwn; /* number of wwns assigned */ 398 u8 num_wwn; /*!< number of wwns assigned */
398 u8 mfg_speeds; /* speeds allowed for this adapter */ 399 u8 mfg_speeds; /*!< speeds allowed for this adapter */
399 u8 rsv[2]; 400 u8 rsv[2];
400 char supplier_id[STRSZ(BFA_MFG_SUPPLIER_ID_SIZE)]; 401 char supplier_id[STRSZ(BFA_MFG_SUPPLIER_ID_SIZE)];
401 char supplier_partnum[STRSZ(BFA_MFG_SUPPLIER_PARTNUM_SIZE)]; 402 char supplier_partnum[STRSZ(BFA_MFG_SUPPLIER_PARTNUM_SIZE)];
402 char 403 char supplier_serialnum[STRSZ(BFA_MFG_SUPPLIER_SERIALNUM_SIZE)];
403 supplier_serialnum[STRSZ(BFA_MFG_SUPPLIER_SERIALNUM_SIZE)]; 404 char supplier_revision[STRSZ(BFA_MFG_SUPPLIER_REVISION_SIZE)];
404 char 405 mac_t mfg_mac; /*!< base mac address */
405 supplier_revision[STRSZ(BFA_MFG_SUPPLIER_REVISION_SIZE)]; 406 u8 num_mac; /*!< number of mac addresses */
406 mac_t mfg_mac; /* mac address */ 407 u8 rsv2;
407 u8 num_mac; /* number of mac addresses */ 408 u32 card_type; /*!< card type */
408 u8 rsv2; 409 char cap_nic; /*!< capability nic */
409 u32 mfg_type; /* card type */ 410 char cap_cna; /*!< capability cna */
410 u8 rsv3[108]; 411 char cap_hba; /*!< capability hba */
411 u8 md5_chksum[BFA_MFG_CHKSUM_SIZE]; /* md5 checksum */ 412 char cap_fc16g; /*!< capability fc 16g */
413 char cap_sriov; /*!< capability sriov */
414 char cap_mezz; /*!< capability mezz */
415 u8 rsv3;
416 u8 mfg_nports; /*!< number of ports */
417 char media[8]; /*!< xfi/xaui */
418 char initial_mode[8]; /*!< initial mode: hba/cna/nic */
419 u8 rsv4[84];
420 u8 md5_chksum[BFA_MFG_CHKSUM_SIZE]; /*!< md5 checksum */
412}; 421};
413 422
414#pragma pack() 423#pragma pack()
@@ -825,6 +834,53 @@ struct sfp_xcvr_s {
825 union sfp_xcvr_fc3_code_u fc3; 834 union sfp_xcvr_fc3_code_u fc3;
826}; 835};
827 836
837/*
838 * Flash module specific
839 */
840#define BFA_FLASH_PART_ENTRY_SIZE 32 /* partition entry size */
841#define BFA_FLASH_PART_MAX 32 /* maximal # of partitions */
842
843enum bfa_flash_part_type {
844 BFA_FLASH_PART_OPTROM = 1, /* option rom partition */
845 BFA_FLASH_PART_FWIMG = 2, /* firmware image partition */
846 BFA_FLASH_PART_FWCFG = 3, /* firmware tuneable config */
847 BFA_FLASH_PART_DRV = 4, /* IOC driver config */
848 BFA_FLASH_PART_BOOT = 5, /* boot config */
849 BFA_FLASH_PART_ASIC = 6, /* asic bootstrap configuration */
850 BFA_FLASH_PART_MFG = 7, /* manufacturing block partition */
851 BFA_FLASH_PART_OPTROM2 = 8, /* 2nd option rom partition */
852 BFA_FLASH_PART_VPD = 9, /* vpd data of OEM info */
853 BFA_FLASH_PART_PBC = 10, /* pre-boot config */
854 BFA_FLASH_PART_BOOTOVL = 11, /* boot overlay partition */
855 BFA_FLASH_PART_LOG = 12, /* firmware log partition */
856 BFA_FLASH_PART_PXECFG = 13, /* pxe boot config partition */
857 BFA_FLASH_PART_PXEOVL = 14, /* pxe boot overlay partition */
858 BFA_FLASH_PART_PORTCFG = 15, /* port cfg partition */
859 BFA_FLASH_PART_ASICBK = 16, /* asic backup partition */
860};
861
862/*
863 * flash partition attributes
864 */
865struct bfa_flash_part_attr_s {
866 u32 part_type; /* partition type */
867 u32 part_instance; /* partition instance */
868 u32 part_off; /* partition offset */
869 u32 part_size; /* partition size */
870 u32 part_len; /* partition content length */
871 u32 part_status; /* partition status */
872 char rsv[BFA_FLASH_PART_ENTRY_SIZE - 24];
873};
874
875/*
876 * flash attributes
877 */
878struct bfa_flash_attr_s {
879 u32 status; /* flash overall status */
880 u32 npart; /* num of partitions */
881 struct bfa_flash_part_attr_s part[BFA_FLASH_PART_MAX];
882};
883
828#pragma pack() 884#pragma pack()
829 885
830#endif /* __BFA_DEFS_H__ */ 886#endif /* __BFA_DEFS_H__ */