net/qede/base: get pre-negotiated OEM values

Request management FW for OEM values, which are negotiated prior to
the driver load by sending the GET_OEM_UPDATES command after both
engines are initialized.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This commit is contained in:
Rasesh Mody 2018-09-29 08:14:33 +00:00 committed by Ferruh Yigit
parent 15dfc1ecb3
commit 54f74d6a6a
2 changed files with 22 additions and 0 deletions

View File

@ -2645,6 +2645,20 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,
"Failed to send GET_OEM_UPDATES attention request\n");
}
if (IS_PF(p_dev)) {
/* Get pre-negotiated values for stag, bandwidth etc. */
p_hwfn = ECORE_LEADING_HWFN(p_dev);
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
"Sending GET_OEM_UPDATES command to trigger stag/bandwidth attention handling\n");
rc = ecore_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
DRV_MSG_CODE_GET_OEM_UPDATES,
1 << DRV_MB_PARAM_DUMMY_OEM_UPDATES_OFFSET,
&resp, &param);
if (rc != ECORE_SUCCESS)
DP_NOTICE(p_hwfn, false,
"Failed to send GET_OEM_UPDATES attention request\n");
}
if (IS_PF(p_dev)) {
p_hwfn = ECORE_LEADING_HWFN(p_dev);
drv_mb_param = STORM_FW_VERSION;

View File

@ -1696,6 +1696,8 @@ struct public_drv_mb {
#define FW_MSG_CODE_RESOURCE_ALLOC_UNKNOWN 0x35000000
#define FW_MSG_CODE_RESOURCE_ALLOC_DEPRECATED 0x36000000
#define FW_MSG_CODE_RESOURCE_ALLOC_GEN_ERR 0x37000000
#define FW_MSG_CODE_GET_OEM_UPDATES_DONE 0x41000000
#define FW_MSG_CODE_NIG_DRAIN_DONE 0x30000000
#define FW_MSG_CODE_VF_DISABLED_DONE 0xb0000000
#define FW_MSG_CODE_DRV_CFG_VF_MSIX_DONE 0xb0010000
@ -1804,6 +1806,12 @@ struct public_drv_mb {
#define FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR (1 << 0)
#define FW_MB_PARAM_OEM_UPDATE_MASK 0xFF
#define FW_MB_PARAM_OEM_UPDATE_OFFSET 0
#define FW_MB_PARAM_OEM_UPDATE_BW 0x01
#define FW_MB_PARAM_OEM_UPDATE_S_TAG 0x02
#define FW_MB_PARAM_OEM_UPDATE_CFG 0x04
u32 drv_pulse_mb;
#define DRV_PULSE_SEQ_MASK 0x00007fff
#define DRV_PULSE_SYSTEM_TIME_MASK 0xffff0000