From: Guinan Sun <guinanx.sun@intel.com>
To: qabuild@intel.com
Cc: Guinan Sun <guinanx.sun@intel.com>,
stable@dpdk.org, Sasha Neftin <sasha.neftin@intel.com>
Subject: [dpdk-stable] [DPDK 18/19] net/igc/base: fix LTR algorithm for i225 device
Date: Thu, 2 Jul 2020 05:23:13 +0000 [thread overview]
Message-ID: <20200702052314.41828-18-guinanx.sun@intel.com> (raw)
In-Reply-To: <20200702052314.41828-1-guinanx.sun@intel.com>
i225 specification recommended minus 1 microsecond from
a value calculated for a LTR. The scale is not changed.
Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
drivers/net/igc/base/igc_i225.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c
index 34d190c70..bbd783ae4 100644
--- a/drivers/net/igc/base/igc_i225.c
+++ b/drivers/net/igc/base/igc_i225.c
@@ -1072,7 +1072,9 @@ static s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
scale_max = (ltr_max / 1024) < 1024 ? IGC_LTRMAXV_SCALE_1024 :
IGC_LTRMAXV_SCALE_32768;
ltr_min /= scale_min == IGC_LTRMINV_SCALE_1024 ? 1024 : 32768;
+ ltr_min -= 1;
ltr_max /= scale_max == IGC_LTRMAXV_SCALE_1024 ? 1024 : 32768;
+ ltr_max -= 1;
/* Only write the LTR thresholds if they differ from before. */
ltrv = IGC_READ_REG(hw, IGC_LTRMINV);
--
2.17.1
parent reply other threads:[~2020-07-02 5:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20200702052314.41828-1-guinanx.sun@intel.com>]
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=20200702052314.41828-18-guinanx.sun@intel.com \
--to=guinanx.sun@intel.com \
--cc=qabuild@intel.com \
--cc=sasha.neftin@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).