From c399cc9ba05398ced510b9654053f62a80390102 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Wed, 26 Sep 2018 17:04:56 +0800 Subject: [PATCH] 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.20.1