From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CD4C4618E; Tue, 4 Feb 2025 16:14:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF69F427D4; Tue, 4 Feb 2025 16:12:10 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 59B2D4111B for ; Tue, 4 Feb 2025 16:11:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738681916; x=1770217916; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wJVCXPfLIEKWLr792mInal2afgOHMm9zFSw+TJTXRVo=; b=dEqA4VwN/cLyNOtdQk6GdGbOoEOr0sfhiNyw3SaB9n6XfYAio1JFDMJl AwwGYj7QxeIwPSZ8yo1q9oD8b+erdvJ4qQ6mC6dkNRNObrQ/elJU1r3mn QLXPzMkzG5srd/cPjWaYagv9ogtU++lKysbbqDDeY9/1HE5TjlUGY0Kk+ Mx7/ptUMi8aojBBx4Y2KCix93kudfiQdsGNPnC/dtN3OaibdJPkVClrTi JrQRDIhnZCh8UuQIzkeceR8q1sl3u/phAF7fXNhc8YYrBQwQOC32wLX56 NpkGYTKco+LovfSxSCBKE3h3W2xK1t90BpddaPKfuhkES9sWRqiVd6a53 w==; X-CSE-ConnectionGUID: P5m5FoBwS8iyjXvxR0qx1w== X-CSE-MsgGUID: 9iRp17KUT8KQ7mT0vmh1tw== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="39097130" X-IronPort-AV: E=Sophos;i="6.13,258,1732608000"; d="scan'208";a="39097130" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2025 07:11:55 -0800 X-CSE-ConnectionGUID: lFqHGMKhS5e8pZkfkCZ5eA== X-CSE-MsgGUID: dnwuekrXSHuFHIj1KN485A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,258,1732608000"; d="scan'208";a="110792664" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa008.fm.intel.com with ESMTP; 04 Feb 2025 07:11:54 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH v2 22/54] net/e1000/base: fix typo in LTR calculation Date: Tue, 4 Feb 2025 15:10:28 +0000 Message-ID: <5c15dc7fa1e6d2e93de91420884dc1af8b1ac535.1738681726.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Dima Ruinskiy The LTR maximum value was incorrectly written using the scale from the LTR minimum value. This would cause incorrect values to be sent, in cases where the initial calculation lead to different min/max scales. Fix the typo to correctly calculate the LTR maximum value. Signed-off-by: Dima Ruinskiy Signed-off-by: Anatoly Burakov --- drivers/net/intel/e1000/base/e1000_i225.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/intel/e1000/base/e1000_i225.c b/drivers/net/intel/e1000/base/e1000_i225.c index 0b029c0ac2..611f3e8408 100644 --- a/drivers/net/intel/e1000/base/e1000_i225.c +++ b/drivers/net/intel/e1000/base/e1000_i225.c @@ -997,7 +997,7 @@ static s32 e1000_set_ltr_i225(struct e1000_hw *hw, bool link) ltrv = E1000_READ_REG(hw, E1000_LTRMAXV); if (ltr_max != (ltrv & E1000_LTRMAXV_LTRV_MASK)) { ltrv = E1000_LTRMAXV_LSNP_REQ | ltr_max | - (scale_min << E1000_LTRMAXV_SCALE_SHIFT); + (scale_max << E1000_LTRMAXV_SCALE_SHIFT); E1000_WRITE_REG(hw, E1000_LTRMAXV, ltrv); } } -- 2.43.5