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 72D2C454EF; Tue, 25 Jun 2024 13:15:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 815F8427BD; Tue, 25 Jun 2024 13:15:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 8F0CD402C4 for ; Tue, 25 Jun 2024 13:15:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314107; x=1750850107; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ToNIsYc1TuvMI3x1j+wzVvsOcQ3rxPsl+sky/XhENrg=; b=joDy/NtlB/u8C+1kXMLs3i7UIoZX2KUpvkduab1DzS0ggoMi3J6AXg++ yVkUsNqp+R1wbD3Kgz6yab5nNoj6ca7R4BNGVCzLB2Fscvd6dsYWnP9Tl D1JQlqV8SU5pwtB6GcORq39IfhNpYH3zCNOL7n0M6X0Q1W3/99r+cFNVg jnbmPjoIRAbiiapdugQUULeV3fk/0Ythwf6AVsgckKkfSSHCpzkr3O55y +9qj9lYUYa//aqk/eu5ktNE1goPDQt86+KNNLwdCXGWlHfyvYXAz/M4rD vHrXXPwW/dQI4oLRCvlkAut14gGdsSz5ibg9UOPf0sstDxUfStWFhXpvs Q==; X-CSE-ConnectionGUID: gjXYcopMT9y7FkM8XoUX+Q== X-CSE-MsgGUID: k5bfm3kYQdGz9Gpe7mFnGQ== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080065" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080065" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:15:06 -0700 X-CSE-ConnectionGUID: TYWxaHIKTYGV1cjMFbzTJw== X-CSE-MsgGUID: 9QABK+CHQVaK2/2oJ7KI8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43718859" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:15:06 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Siddaraju DH , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 004/129] net/ice/base: update phy config during link restart Date: Tue, 25 Jun 2024 12:12:09 +0100 Message-ID: <56447c21d62914f25d92e98cb9387b179909ab27.1719313663.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 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: Siddaraju DH Update en_link in curr_user_phy_cfg.caps on successful execution of set_link_restart_an operation. Signed-off-by: Siddaraju DH Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index d79162b5d1..278baf3848 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -3966,6 +3966,7 @@ int ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, struct ice_sq_cd *cd) { + int status = ICE_ERR_AQ_ERROR; struct ice_aqc_restart_an *cmd; struct ice_aq_desc desc; @@ -3980,7 +3981,16 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, else cmd->cmd_flags &= ~ICE_AQC_RESTART_AN_LINK_ENABLE; - return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + status = ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + if (status) + return status; + + if (ena_link) + pi->phy.curr_user_phy_cfg.caps |= ICE_AQC_PHY_EN_LINK; + else + pi->phy.curr_user_phy_cfg.caps &= ~ICE_AQC_PHY_EN_LINK; + + return 0; } /** -- 2.43.0