From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9597BA0523 for ; Thu, 2 Jul 2020 07:43:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CD0B1D90B; Thu, 2 Jul 2020 07:43:40 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DE38E1D90B for ; Thu, 2 Jul 2020 07:43:38 +0200 (CEST) IronPort-SDR: vB4nGkan8I8SGtpggLY41aD/TjRXvk258alQLLTfy51ZL/NGEFvUFerqf7so2spdK9xk+GeB49 letMVnWnzQVA== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="211844457" X-IronPort-AV: E=Sophos;i="5.75,303,1589266800"; d="scan'208";a="211844457" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 22:43:37 -0700 IronPort-SDR: iC/dIqz04XvgTWjrGWwCqJSVai+U4Db1m6xxM0Gi8NNPHjHUgsMTpIyvyjaYC5Gn5yczeUXTMy 0JDnCq0uNRHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,303,1589266800"; d="scan'208";a="295779694" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 01 Jul 2020 22:43:36 -0700 From: Guinan Sun To: qabuild@intel.com Cc: Guinan Sun , stable@dpdk.org, Sasha Neftin Date: Thu, 2 Jul 2020 05:23:13 +0000 Message-Id: <20200702052314.41828-18-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200702052314.41828-1-guinanx.sun@intel.com> References: <20200702052314.41828-1-guinanx.sun@intel.com> Subject: [dpdk-stable] [DPDK 18/19] net/igc/base: fix LTR algorithm for i225 device X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 Signed-off-by: Guinan Sun --- 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