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 9C3C445895; Thu, 29 Aug 2024 11:01:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B87042DB4; Thu, 29 Aug 2024 11:00:40 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id B66AF42D7B for ; Thu, 29 Aug 2024 11:00:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724922036; x=1756458036; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=2sR6V83Lv3Z7vghBOo4Rnr5BbC16Qlo29rq1lednRug=; b=UEywdpzWeEmzYtxHi2J63LQOzhYBTxViW3p/bOeI+2m5JD3xCNOeGlQd M8ACS3VInABhYJukaHcwmijX/LuatZUsOwXZ3fKWp8fXBn6lnrZJ24fiF +vNfFEcUJ91qc9Sw8qKRixjYVNNxTUOAhf+vWK1XRZt2WqAulXqWLI4f4 zjUu9jOunZVoAmlaxLGwtKiZPUCZY3UIWEx1f5/cBik9yG4up+ASIykLS XE1os670qvOE2xv6kw0taIkDp6x8c5fxq4Hxsw9OPfk50UYyec0HGUl+p h7jAXGa507ZxjrphVM+Yyv2rRslK8OnGEt0XFjLFy1H1av/Alv5iyrIUl A==; X-CSE-ConnectionGUID: iXuiKcXiSHOW3SMJXuokqg== X-CSE-MsgGUID: Cb24OpI3QcWIpAmhbJ0AUA== X-IronPort-AV: E=McAfee;i="6700,10204,11178"; a="23663457" X-IronPort-AV: E=Sophos;i="6.10,185,1719903600"; d="scan'208";a="23663457" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2024 02:00:35 -0700 X-CSE-ConnectionGUID: 8ajXRWZiQNK3FFRtLQYvaA== X-CSE-MsgGUID: EC2XhdyrS+SY2YagUsZxSg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,185,1719903600"; d="scan'208";a="64202947" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa008.jf.intel.com with ESMTP; 29 Aug 2024 02:00:34 -0700 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v1 08/15] net/ixgbe/base: fix speed autonegotiation on E610 Date: Thu, 29 Aug 2024 10:00:13 +0100 Message-ID: <8f675b72a11236172d740240bfb81fb1ee410e9f.1724921977.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: Krzysztof Galazka When user changed advertised speed settings and link was already up driver asked FW only for active PHY configuration. This prevented it from adding speeds, which are supported but was earlier disabled by user. Get all speeds supported by HW to allow user enabling any of them. Signed-off-by: Krzysztof Galazka Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c b/drivers/net/ixgbe/base/ixgbe_e610.c index b9b1ba32c3..6eaf377f4a 100644 --- a/drivers/net/ixgbe/base/ixgbe_e610.c +++ b/drivers/net/ixgbe/base/ixgbe_e610.c @@ -4342,7 +4342,8 @@ s32 ixgbe_setup_phy_link_E610(struct ixgbe_hw *hw) { struct ixgbe_aci_cmd_get_phy_caps_data pcaps; struct ixgbe_aci_cmd_set_phy_cfg_data pcfg; - u8 rmode = IXGBE_ACI_REPORT_ACTIVE_CFG; + u8 rmode = IXGBE_ACI_REPORT_TOPO_CAP_MEDIA; + u64 sup_phy_type_low, sup_phy_type_high; s32 rc; rc = ixgbe_aci_get_link_info(hw, false, NULL); @@ -4359,6 +4360,15 @@ s32 ixgbe_setup_phy_link_E610(struct ixgbe_hw *hw) goto err; } + sup_phy_type_low = pcaps.phy_type_low; + sup_phy_type_high = pcaps.phy_type_high; + + /* Get Active configuration to avoid unintended changes */ + rc = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_ACTIVE_CFG, + &pcaps); + if (rc) { + goto err; + } ixgbe_copy_phy_caps_to_cfg(&pcaps, &pcfg); /* Set default PHY types for a given speed */ @@ -4406,8 +4416,8 @@ s32 ixgbe_setup_phy_link_E610(struct ixgbe_hw *hw) } /* Mask the set values to avoid requesting unsupported link types */ - pcfg.phy_type_low &= pcaps.phy_type_low; - pcfg.phy_type_high &= pcaps.phy_type_high; + pcfg.phy_type_low &= sup_phy_type_low; + pcfg.phy_type_high &= sup_phy_type_high; if (pcfg.phy_type_high != pcaps.phy_type_high || pcfg.phy_type_low != pcaps.phy_type_low || -- 2.43.5