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 320464404F; Wed, 12 Jun 2024 17:04:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E821940E50; Wed, 12 Jun 2024 17:03:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id EDE2F40E39 for ; Wed, 12 Jun 2024 17:03:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204606; x=1749740606; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BPNVDdiu+YX8pMy5SRnFqrnwhM/1LtGZjnpqga0Z7NI=; b=ZG7MAvME3rYkuuoUs3tHstZ02zbk1IvJJhfiI3keJ6aOEMGrHsJMZBXv rbfW2rkPpydcPqZQbBNUXRayPIYjLyvsj1O1zY6ZA9yE4jzRVnh6vS37b leFaKsM/cJYvSPqt1pp872Tytpir229sEErNbmTPzzm2kkpTbbIMVqhnV AuM5u1lQhqfpVHVRd79gVR7fp8oRVC814HHjiBomHG//1XmzQrHNrdcKf EwJPOVlAdp7QoQvu4OPicX+QDakEeHVudiGtjlnxBLZh7WyKezzA5dMbE z2B9d4BnihyR1Wtq+Es0XnMU3wzQ75KJMf98Qs3CGhl2uxDF/4/mtJraz g==; X-CSE-ConnectionGUID: GRFRoMMzRrSIDA57oHuJjA== X-CSE-MsgGUID: Kg5v3kd1QIOTOtfjoOrQ4w== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459075" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459075" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:03:23 -0700 X-CSE-ConnectionGUID: qDmAufkCQdSMd0Nv1GRriQ== X-CSE-MsgGUID: AdVr6gvGQouiQeSxn9HD+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39924810" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:03:22 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Siddaraju DH Subject: [PATCH v2 004/148] net/ice/base: update phy config during link restart Date: Wed, 12 Jun 2024 15:59:58 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> 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: Ian Stokes 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 2eb3084dac..1d666b7708 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) { + enum ice_status 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 ICE_SUCCESS; } /** -- 2.43.0