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 F273744031; Tue, 14 May 2024 17:17:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 626F34029E; Tue, 14 May 2024 17:17:23 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id B198840156; Tue, 14 May 2024 17:17:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715699842; x=1747235842; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aWDimZaVfsRnxP0EbFyD6pFXDy1c47jFH0uIMObfS3w=; b=aOuPnC0/kjTItGSbyEsSKxM3j6ZUrwYRX5C4wcwM6wt8kfod6VTcXU9m 31JH10TIDW3oHS1GqGXyllFQ1wrsLousnXu/aMR2sxo6dd5XEk1Oyl5w/ pNqOyoZQtorTSTuv2gAJHWPJ2yjiBcghar1e2DWWhmqtprlA8OgXLYaGk uAYSa6fLsY7M7Ii96N6rYXvQI5sw1BFIbOYe+1mfLN3/MBRr4OqLNUN8q HBzkeRYmkKbxoCx3VvQCTS3NHWr+DYw3A7qfpXUHTjGj6zdLw+//NKoIp 79IQkv96qQJrqx46yA7DDVvIn4W7n2TTo/jk6Mb0fKk/vpPBnlWxKKDEc A==; X-CSE-ConnectionGUID: YEDlrEv5Rq+28X025G94lg== X-CSE-MsgGUID: DW7b+KXwShq9jITqUlhuQg== X-IronPort-AV: E=McAfee;i="6600,9927,11073"; a="11508601" X-IronPort-AV: E=Sophos;i="6.08,159,1712646000"; d="scan'208";a="11508601" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2024 08:17:19 -0700 X-CSE-ConnectionGUID: 1nU7JNrQQvSk9FBW2HvoCA== X-CSE-MsgGUID: HA5cHyAZSHWvp4TD8TCRVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,159,1712646000"; d="scan'208";a="30764524" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa006.fm.intel.com with ESMTP; 14 May 2024 08:17:18 -0700 From: Anatoly Burakov To: dev@dpdk.org, Sasha Neftin , Jeff Kirsher , Guinan Sun , Wei Zhao Cc: stable@dpdk.org Subject: [PATCH v1 1/1] net/e1000/base: fix link power down Date: Tue, 14 May 2024 16:17:16 +0100 Message-ID: <5362cee0c903d9769ec38f34ee71d4a061727eee.1715699832.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 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 Current code is a result of work to reduce duplication between various device models. However, the logic that was replaced did not exactly match the new logic, and as a result the link power down was not working correctly for some NICs, and the link remained up even when the interface is down. Fix it to correctly power down the link under all circumstances that were supported by old logic. Fixes: 44dddd14059f ("net/e1000/base: remove duplicated codes") Cc: guinanx.sun@intel.com Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- drivers/net/e1000/base/e1000_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000/base/e1000_base.c b/drivers/net/e1000/base/e1000_base.c index ab73e1e59e..3ec32e7240 100644 --- a/drivers/net/e1000/base/e1000_base.c +++ b/drivers/net/e1000/base/e1000_base.c @@ -107,7 +107,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw) return; /* If the management interface is not enabled, then power down */ - if (phy->ops.check_reset_block(hw)) + if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw))) e1000_power_down_phy_copper(hw); } -- 2.43.0