+ #define LINK_ATTR_SYNC_KR2_ENABLE 0x00000001
+ #define LINK_ATTR_84858 0x00000002
+ #define LINK_SFP_EEPROM_COMP_CODE_MASK 0x0000ff00
+ #define LINK_SFP_EEPROM_COMP_CODE_SHIFT 8
+ #define LINK_SFP_EEPROM_COMP_CODE_SR 0x00001000
+ #define LINK_SFP_EEPROM_COMP_CODE_LR 0x00002000
+ #define LINK_SFP_EEPROM_COMP_CODE_LRM 0x00004000
+
+ uint32_t ibft_host_addr_hi; /* Initialize by uEFI ROM Offset 0x158 */
+ uint32_t fcode_ver; /* Offset 0x15c */
+ uint32_t link_change_count[PORT_MAX]; /* Offset 0x160-0x164 */
+ #define LINK_CHANGE_COUNT_MASK 0xff /* Offset 0x168 */
+ /* driver version for each personality*/
+ struct os_drv_ver func_os_drv_ver[E2_FUNC_MAX]; /* Offset 0x16c */
+
+ /* Flag to the driver that PF's drv_info_host_addr buffer was read */
+ uint32_t mfw_drv_indication; /* Offset 0x19c */
+
+ /* We use inidcation for each PF (0..3) */
+ #define MFW_DRV_IND_READ_DONE_OFFSET(_pf_) (1 << (_pf_))
+
+ union { /* For various OEMs */ /* Offset 0x1a0 */
+ uint8_t storage_boot_prog[E2_FUNC_MAX];
+ #define STORAGE_BOOT_PROG_MASK 0x000000FF
+ #define STORAGE_BOOT_PROG_NONE 0x00000000
+ #define STORAGE_BOOT_PROG_ISCSI_IP_ACQUIRED 0x00000002
+ #define STORAGE_BOOT_PROG_FCOE_FABRIC_LOGIN_SUCCESS 0x00000002
+ #define STORAGE_BOOT_PROG_TARGET_FOUND 0x00000004
+ #define STORAGE_BOOT_PROG_ISCSI_CHAP_SUCCESS 0x00000008
+ #define STORAGE_BOOT_PROG_FCOE_LUN_FOUND 0x00000008
+ #define STORAGE_BOOT_PROG_LOGGED_INTO_TGT 0x00000010
+ #define STORAGE_BOOT_PROG_IMG_DOWNLOADED 0x00000020
+ #define STORAGE_BOOT_PROG_OS_HANDOFF 0x00000040
+ #define STORAGE_BOOT_PROG_COMPLETED 0x00000080
+
+ uint32_t oem_i2c_data_addr;
+ };
+
+ /* 9 entries for the C2S PCP map for each inner VLAN PCP + 1 default */
+ /* For PCP values 0-3 use the map lower */
+ /* 0xFF000000 - PCP 0, 0x00FF0000 - PCP 1,
+ * 0x0000FF00 - PCP 2, 0x000000FF PCP 3
+ */
+ uint32_t c2s_pcp_map_lower[E2_FUNC_MAX]; /* 0x1a4 */
+
+ /* For PCP values 4-7 use the map upper */
+ /* 0xFF000000 - PCP 4, 0x00FF0000 - PCP 5,
+ * 0x0000FF00 - PCP 6, 0x000000FF PCP 7
+ */
+ uint32_t c2s_pcp_map_upper[E2_FUNC_MAX]; /* 0x1b4 */
+
+ /* For PCP default value get the MSB byte of the map default */
+ uint32_t c2s_pcp_map_default[E2_FUNC_MAX]; /* 0x1c4 */
+
+ /* FC_NPIV table offset in NVRAM */
+ uint32_t fc_npiv_nvram_tbl_addr[PORT_MAX]; /* 0x1d4 */
+
+ /* Shows last method that changed configuration of this device */
+ enum curr_cfg_method_e curr_cfg; /* 0x1dc */
+
+ /* Storm FW version, shold be kept in the format 0xMMmmbbdd:
+ * MM - Major, mm - Minor, bb - Build ,dd - Drop
+ */
+ uint32_t netproc_fw_ver; /* 0x1e0 */
+
+ /* Option ROM SMASH CLP version */
+ uint32_t clp_ver; /* 0x1e4 */
+
+ uint32_t pcie_bus_num; /* 0x1e8 */
+
+ uint32_t sriov_switch_mode; /* 0x1ec */
+ #define SRIOV_SWITCH_MODE_NONE 0x0
+ #define SRIOV_SWITCH_MODE_VEB 0x1
+ #define SRIOV_SWITCH_MODE_VEPA 0x2
+
+ uint8_t rsrv2[E2_FUNC_MAX]; /* 0x1f0 */
+
+ uint32_t img_inv_table_addr; /* Address to INV_TABLE_P */ /* 0x1f4 */
+
+ uint32_t mtu_size[E2_FUNC_MAX]; /* 0x1f8 */
+
+ uint32_t os_driver_state[E2_FUNC_MAX]; /* 0x208 */
+ #define OS_DRIVER_STATE_NOT_LOADED 0 /* not installed */
+ #define OS_DRIVER_STATE_LOADING 1 /* transition state */
+ #define OS_DRIVER_STATE_DISABLED 2 /* installed but disabled */
+ #define OS_DRIVER_STATE_ACTIVE 3 /* installed and active */
+
+ /* mini dump driver info */
+ struct mdump_driver_info drv_info; /* 0x218 */
+
+ /* written by mfw, read by driver, eg. feature capability support */
+ uint32_t mfw_flags; /* 0x22c */
+ #define DISABLE_EMBEDDED_LLDP_SUPPORT 0x00000001
+};
+
+#define VLAN_BITMAP_SIZE 512
+#define VLAN_PF_NUM_MAX 8
+
+struct pf_vlan_table {
+ uint16_t pvid;
+ uint8_t pcp;
+ uint8_t rsvd;
+ uint8_t trunk_vlan_bitmap[VLAN_BITMAP_SIZE];
+ uint32_t rsvd1[4];
+};
+
+struct vlan_table_s {
+ uint32_t version;
+ #define VLAN_TABLE_IMAGE_VERSION_1 1
+ uint8_t vlan_mode[NVM_PATH_MAX][PORT_MAX];
+ #define VLAN_MODE_NORMAL 0
+ #define VLAN_MODE_FILTER 1
+ #define VLAN_MODE_QINQ 2
+ struct pf_vlan_table pf_vlans[VLAN_PF_NUM_MAX];
+ uint32_t rsvd2[8];
+};
+
+/* The VLAN table Image is stored in Big Endian format */
+struct nvm_vlan_table_image {
+ struct vlan_table_s vlan_table;
+ uint32_t crc;