patches for DPDK stable branches
 help / color / mirror / Atom feed
From: yanx.fu@intel.com
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, stable@dpdk.org, FuYanX <yanx.fu@intel.com>
Subject: [dpdk-stable] [dpdk-dev][PATCH v1 1/1] driver/net/ice sleep in dev_init
Date: Thu,  3 Sep 2020 22:25:20 +0000	[thread overview]
Message-ID: <20200903222520.45572-1-yanx.fu@intel.com> (raw)

From: FuYanX <yanx.fu@intel.com>

Fix a hardware issue at C0 4 port NIC via fiber.

When ice_driver send resetHW cmd, there is need to wait 100ms,
then the HW functions will be completed. Otherwise, the function
of the port link status will be unstable.

Solution just follow datasheet requirement.
The operating system sets the FLR bit in the Device Control register of the PF.
The operating system is required by PCIe specification to wait 100 ms
before it can assume that the FLR sequence is completed by hardware.

Signed-off-by: FuYanX <yanx.fu@intel.com>
---
 drivers/net/ice/base/ice_common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 6168fb4f0..f5ea94ece 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -705,6 +705,12 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 	if (status)
 		return status;
 
+	/* The driver e.g. vfio-pci may triggle a FLR reset.
+	 * The operating system sets the FLR bit in the Device Control register of the PF.
+	 * The operating system is required by PCIe specification to wait 100 ms
+	 * before it can assume that the FLR sequence is completed by hardware.
+	 */
+	rte_delay_ms(100);
 	hw->pf_id = (u8)(rd32(hw, PF_FUNC_RID) &
 			 PF_FUNC_RID_FUNCTION_NUMBER_M) >>
 		PF_FUNC_RID_FUNCTION_NUMBER_S;
-- 
2.25.1


                 reply	other threads:[~2020-09-04  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200903222520.45572-1-yanx.fu@intel.com \
    --to=yanx.fu@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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).