net/i40e: fix using recovery mode firmware
Device can't function properly with a firmware that is in recovery mode. Check the firmware status at initialization time. If the firmware is in recovery mode, alert the user to check it. Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
b8ffdcc0ba
commit
81b531cfc2
@ -1273,7 +1273,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
|
|||||||
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
|
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
|
||||||
struct i40e_vsi *vsi;
|
struct i40e_vsi *vsi;
|
||||||
int ret;
|
int ret;
|
||||||
uint32_t len;
|
uint32_t len, val;
|
||||||
uint8_t aq_fail = 0;
|
uint8_t aq_fail = 0;
|
||||||
|
|
||||||
PMD_INIT_FUNC_TRACE();
|
PMD_INIT_FUNC_TRACE();
|
||||||
@ -1324,6 +1324,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
|
|||||||
*/
|
*/
|
||||||
hw->switch_tag = 0xffff;
|
hw->switch_tag = 0xffff;
|
||||||
|
|
||||||
|
val = I40E_READ_REG(hw, I40E_GL_FWSTS);
|
||||||
|
if (val & I40E_GL_FWSTS_FWS1B_MASK) {
|
||||||
|
PMD_INIT_LOG(ERR, "\nERROR: "
|
||||||
|
"Firmware recovery mode detected. Limiting functionality.\n"
|
||||||
|
"Refer to the Intel(R) Ethernet Adapters and Devices "
|
||||||
|
"User Guide for details on firmware recovery mode.");
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if need to support multi-driver */
|
/* Check if need to support multi-driver */
|
||||||
i40e_support_multi_driver(dev);
|
i40e_support_multi_driver(dev);
|
||||||
/* Check if users want the latest supported vec path */
|
/* Check if users want the latest supported vec path */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user