net/qede/base: add mf-bit/API for FIP special mode

Add mf-bit/API for FIP special mode.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This commit is contained in:
Rasesh Mody 2018-09-29 08:14:30 +00:00 committed by Ferruh Yigit
parent 0b855a345e
commit bf03492a08
3 changed files with 19 additions and 1 deletions

View File

@ -543,6 +543,9 @@ enum ecore_mf_mode_bit {
/* Use stag for steering */
ECORE_MF_8021AD_TAGGING,
/* Allow FIP discovery fallback */
ECORE_MF_FIP_SPECIAL,
};
enum ecore_ufp_mode {

View File

@ -3704,7 +3704,8 @@ ecore_hw_get_nvm_info(struct ecore_hwfn *p_hwfn,
case NVM_CFG1_GLOB_MF_MODE_BD:
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_OVLAN_CLSS |
1 << ECORE_MF_LLH_PROTO_CLSS |
1 << ECORE_MF_8021AD_TAGGING;
1 << ECORE_MF_8021AD_TAGGING |
1 << ECORE_MF_FIP_SPECIAL;
break;
case NVM_CFG1_GLOB_MF_MODE_NPAR1_0:
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_LLH_MAC_CLSS |
@ -5804,3 +5805,8 @@ void ecore_set_fw_mac_addr(__le16 *fw_msb,
((u8 *)fw_lsb)[0] = mac[5];
((u8 *)fw_lsb)[1] = mac[4];
}
bool ecore_is_mf_fip_special(struct ecore_dev *p_dev)
{
return !!OSAL_TEST_BIT(ECORE_MF_FIP_SPECIAL, &p_dev->mf_bits);
}

View File

@ -704,4 +704,13 @@ ecore_set_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 rx_coal,
enum _ecore_status_t ecore_pglueb_set_pfid_enable(struct ecore_hwfn *p_hwfn,
struct ecore_ptt *p_ptt,
bool b_enable);
/**
* @brief Whether FIP discovery fallback special mode is enabled or not.
*
* @param cdev
*
* @return true if device is in FIP special mode, false otherwise.
*/
bool ecore_is_mf_fip_special(struct ecore_dev *p_dev);
#endif