Read and use the default MTU value from shared-memory.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
/* Default DCBX mode */
u8 dcbx_mode;
+
+ u16 mtu;
};
struct ecore_hw_cid_data {
ecore_get_num_funcs(p_hwfn, p_ptt);
+ if (ecore_mcp_is_init(p_hwfn))
+ p_hwfn->hw_info.mtu = p_hwfn->mcp_info->func_info.mtu;
+
/* In case of forcing the driver's default resource allocation, calling
* ecore_hw_get_resc() should come after initializing the personality
* and after getting the number of functions, since the calculation of
info->ovlan = (u16)(shmem_info.ovlan_stag & FUNC_MF_CFG_OV_STAG_MASK);
+ info->mtu = (u16)shmem_info.mtu_size;
+
+ if (info->mtu == 0)
+ info->mtu = 1500;
+
+ info->mtu = (u16)shmem_info.mtu_size;
+
+ if (info->mtu == 0)
+ info->mtu = 1500;
+
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_IFUP),
"Read configuration from shmem: pause_on_host %02x"
" protocol %02x BW [%02x - %02x]"
#define ECORE_MCP_VLAN_UNSET (0xffff)
u16 ovlan;
+
+ u16 mtu;
};
struct ecore_mcp_nvm_common {
uint32_t flash_size;
uint8_t mf_mode;
bool tx_switching;
+ u16 mtu;
/* To be added... */
};
&dev_info->mfw_rev, NULL);
}
+ dev_info->mtu = ECORE_LEADING_HWFN(edev)->hw_info.mtu;
+
return 0;
}