summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorXiaoyun Li <xiaoyun.li@intel.com>2018-12-03 15:07:46 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-12-13 16:40:25 +0000
commit81b531cfc235149f68a40842abf0767a4fbfe994 (patch)
tree6a39a0bb3ed050e0ed08542a33c0f58532d9312b /drivers/net/i40e
parentb8ffdcc0ba163a173e969b2d8bce5d41132a561d (diff)
downloaddpdk-next-eventdev-81b531cfc235149f68a40842abf0767a4fbfe994.zip
dpdk-next-eventdev-81b531cfc235149f68a40842abf0767a4fbfe994.tar.gz
dpdk-next-eventdev-81b531cfc235149f68a40842abf0767a4fbfe994.tar.xz
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>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/i40e_ethdev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 552a7a5..f61a12e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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_vsi *vsi;
int ret;
- uint32_t len;
+ uint32_t len, val;
uint8_t aq_fail = 0;
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;
+ 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 */
i40e_support_multi_driver(dev);
/* Check if users want the latest supported vec path */