DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xiaoyun Li <xiaoyun.li@intel.com>
To: wenzhuo.lu@intel.com, dev@dpdk.org, helin.zhang@intel.com,
	jingjing.wu@intel.com
Cc: Xiaoyun Li <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: firmware status check
Date: Fri,  7 Sep 2018 11:01:08 -0400	[thread overview]
Message-ID: <1536332468-31544-1-git-send-email-xiaoyun.li@intel.com> (raw)

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>
---
v1:
 * This patch needs base code updating which will be done later.
---
 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 26b1927..263c72b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1107,6 +1107,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
 	hw->allow_unsupported_sfp = 1;
 
+	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;
+	}
+
 	/* Initialize the shared code (base driver) */
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
 	diag = ixgbe_bypass_init_shared_code(hw);
-- 
2.7.4

             reply	other threads:[~2018-09-07 15:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 15:01 Xiaoyun Li [this message]
2018-09-13  2:27 ` Zhang, Qi Z
2018-09-26  9:04 ` [dpdk-dev] [PATCH v2] " Xiaoyun Li
2018-09-26 10:58   ` Zhang, Qi Z
2018-09-26 12:31     ` Ferruh Yigit

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=1536332468-31544-1-git-send-email-xiaoyun.li@intel.com \
    --to=xiaoyun.li@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=wenzhuo.lu@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).