[v2] net/ixgbe: firmware status check

Message ID 20180926090456.42495-1-xiaoyun.li@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/ixgbe: firmware status check |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Li, Xiaoyun Sept. 26, 2018, 9:04 a.m. UTC
  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 <xiaoyun.li@intel.com>
---
v2:
 * The check should be after the shared code init. Fix it.
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Qi Zhang Sept. 26, 2018, 10:58 a.m. UTC | #1
> -----Original Message-----
> From: Li, Xiaoyun
> Sent: Wednesday, September 26, 2018 5:05 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>
> Subject: [PATCH v2] net/ixgbe: firmware status check
> 
> 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 <xiaoyun.li@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Ferruh Yigit Sept. 26, 2018, 12:31 p.m. UTC | #2
On 9/26/2018 11:58 AM, Zhang, Qi Z wrote:
> 
> 
>> -----Original Message-----
>> From: Li, Xiaoyun
>> Sent: Wednesday, September 26, 2018 5:05 PM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
>> <qi.z.zhang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
>> Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>
>> Subject: [PATCH v2] net/ixgbe: firmware status check
>>
>> 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 <xiaoyun.li@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.

Prev version was in next-net, replaced with this one.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index cee886754..192ebd285 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1119,6 +1119,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);