From: Xiaoyun Li Date: Wed, 26 Sep 2018 09:04:56 +0000 (+0800) Subject: net/ixgbe: check firmware status at init X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c399cc9ba05398ced510b9654053f62a80390102;p=dpdk.git net/ixgbe: check firmware status at init Check the firmware status at init time. If the firmware is in recovery mode, alert the user to check it. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 4c3f9a9931..a42bb0ef97 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1118,6 +1118,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) return -EIO; } + if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { + 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; + } + /* pick up the PCI bus settings for reporting later */ ixgbe_get_bus_info(hw);