@@ -133,6 +133,7 @@ enum bfa_status {
133133 BFA_STATUS_SFP_UNSUPP = 10 , /* Unsupported SFP - Replace SFP */
134134 BFA_STATUS_UNKNOWN_VFID = 11 , /* VF_ID not found */
135135 BFA_STATUS_DEVBUSY = 13 , /* Device busy - Retry operation */
136+ BFA_STATUS_FLASH_BAD_LEN = 17 , /* Flash bad length */
136137 BFA_STATUS_UNKNOWN_LWWN = 18 , /* LPORT PWWN not found */
137138 BFA_STATUS_UNKNOWN_RWWN = 19 , /* RPORT PWWN not found */
138139 BFA_STATUS_VPORT_EXISTS = 21 , /* VPORT already exists */
@@ -384,31 +385,39 @@ struct bfa_ioc_attr_s {
384385 * All numerical fields are in big-endian format.
385386 */
386387struct bfa_mfg_block_s {
387- u8 version ; /* manufacturing block version */
388- u8 mfg_sig [3 ]; /* characters 'M', 'F', 'G' */
389- u16 mfgsize ; /* mfg block size */
390- u16 u16_chksum ; /* old u16 checksum */
391- char brcd_serialnum [STRSZ (BFA_MFG_SERIALNUM_SIZE )];
392- char brcd_partnum [STRSZ (BFA_MFG_PARTNUM_SIZE )];
393- u8 mfg_day ; /* manufacturing day */
394- u8 mfg_month ; /* manufacturing month */
395- u16 mfg_year ; /* manufacturing year */
396- wwn_t mfg_wwn ; /* wwn base for this adapter */
397- u8 num_wwn ; /* number of wwns assigned */
398- u8 mfg_speeds ; /* speeds allowed for this adapter */
399- u8 rsv [2 ];
400- char supplier_id [STRSZ (BFA_MFG_SUPPLIER_ID_SIZE )];
401- char supplier_partnum [STRSZ (BFA_MFG_SUPPLIER_PARTNUM_SIZE )];
402- char
403- supplier_serialnum [STRSZ (BFA_MFG_SUPPLIER_SERIALNUM_SIZE )];
404- char
405- supplier_revision [STRSZ (BFA_MFG_SUPPLIER_REVISION_SIZE )];
406- mac_t mfg_mac ; /* mac address */
407- u8 num_mac ; /* number of mac addresses */
408- u8 rsv2 ;
409- u32 mfg_type ; /* card type */
410- u8 rsv3 [108 ];
411- u8 md5_chksum [BFA_MFG_CHKSUM_SIZE ]; /* md5 checksum */
388+ u8 version ; /*!< manufacturing block version */
389+ u8 mfg_sig [3 ]; /*!< characters 'M', 'F', 'G' */
390+ u16 mfgsize ; /*!< mfg block size */
391+ u16 u16_chksum ; /*!< old u16 checksum */
392+ char brcd_serialnum [STRSZ (BFA_MFG_SERIALNUM_SIZE )];
393+ char brcd_partnum [STRSZ (BFA_MFG_PARTNUM_SIZE )];
394+ u8 mfg_day ; /*!< manufacturing day */
395+ u8 mfg_month ; /*!< manufacturing month */
396+ u16 mfg_year ; /*!< manufacturing year */
397+ wwn_t mfg_wwn ; /*!< wwn base for this adapter */
398+ u8 num_wwn ; /*!< number of wwns assigned */
399+ u8 mfg_speeds ; /*!< speeds allowed for this adapter */
400+ u8 rsv [2 ];
401+ char supplier_id [STRSZ (BFA_MFG_SUPPLIER_ID_SIZE )];
402+ char supplier_partnum [STRSZ (BFA_MFG_SUPPLIER_PARTNUM_SIZE )];
403+ char supplier_serialnum [STRSZ (BFA_MFG_SUPPLIER_SERIALNUM_SIZE )];
404+ char supplier_revision [STRSZ (BFA_MFG_SUPPLIER_REVISION_SIZE )];
405+ mac_t mfg_mac ; /*!< base mac address */
406+ u8 num_mac ; /*!< number of mac addresses */
407+ u8 rsv2 ;
408+ u32 card_type ; /*!< card type */
409+ char cap_nic ; /*!< capability nic */
410+ char cap_cna ; /*!< capability cna */
411+ char cap_hba ; /*!< capability hba */
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 */
412421};
413422
414423#pragma pack()
@@ -825,6 +834,53 @@ struct sfp_xcvr_s {
825834 union sfp_xcvr_fc3_code_u fc3 ;
826835};
827836
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+
843+ enum 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+ */
865+ struct 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+ */
878+ struct 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+
828884#pragma pack()
829885
830886#endif /* __BFA_DEFS_H__ */
0 commit comments