From: Xiaoyun Li <xiaoyun.li@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, Xiaoyun Li <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/i40e: firmware status check
Date: Mon, 3 Dec 2018 15:07:46 +0800 [thread overview]
Message-ID: <1543820866-3644-1-git-send-email-xiaoyun.li@intel.com> (raw)
In-Reply-To: <1536332411-31457-1-git-send-email-xiaoyun.li@intel.com>
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:
* Rebase to the newest codes.
---
drivers/net/i40e/i40e_ethdev.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index fea42b0..93cc17b 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 */
--
2.7.4
next prev parent reply other threads:[~2018-12-03 7:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 15:00 [dpdk-dev] [PATCH] " Xiaoyun Li
2018-12-03 7:07 ` Xiaoyun Li [this message]
2018-12-03 8:07 ` [dpdk-dev] [PATCH v2] " Zhang, Qi Z
2018-12-14 16:59 ` Kevin Traynor
2018-12-17 10:57 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-12-17 16:39 ` Kevin Traynor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1543820866-3644-1-git-send-email-xiaoyun.li@intel.com \
--to=xiaoyun.li@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).