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 E028C45655; Fri, 19 Jul 2024 15:44:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC40240E0F; Fri, 19 Jul 2024 15:44:33 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 707D94026A for ; Fri, 19 Jul 2024 15:44:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721396673; x=1752932673; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EvLuI8le9lKsOa+rVOoeSt/8mngSfCie/34SH/Q1A5c=; b=j+gYoeTDOzDYdZrYO6wV8eTKkuATfqXZlRbNncvVBZfO490SQc9ikNrj Js+9qzItRCeRTXS5kdYiSCerI4JSxYUSCPOyEcluswTSV6n15a31Qn9Ci 9YkGJAEDYqotuZFNdQ2GWJ3WojXchiI5r5z4MSPeVaCUIUZwhh21yt9Wa X9UR82Amqxtdt2mdwpNXLbuZrbF/nzvWUbaBF8sRE2bnPmG/7ObN1QZhe 6Y6HdnTFLdhh5YMCKekv+6nr7+y17SPDoEKPWkr5hbESl9lSpJPOXZmPM PC+Tnd1mCYHTsUTNq825Qqyj3+Rp5wSfRAqnTYINoNnlP662vb7fR0UBo A==; X-CSE-ConnectionGUID: I9ds7UAhReeucjfIOBXqiA== X-CSE-MsgGUID: CfRxIIziSFGDOCUTApTsBw== X-IronPort-AV: E=McAfee;i="6700,10204,11138"; a="19141837" X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="19141837" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2024 06:44:32 -0700 X-CSE-ConnectionGUID: eSQsi5r3Q9yFvuZjOe96aw== X-CSE-MsgGUID: zFxJR2xAQxe1wQnUGxAm5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="82165548" Received: from sivswdev19.ir.intel.com ([10.237.217.69]) by fmviesa001.fm.intel.com with ESMTP; 19 Jul 2024 06:44:30 -0700 From: Ian Stokes To: dev@dpdk.org Cc: bruce.richardson@intel.com, Ian Stokes Subject: [PATCH] net/ice: fix DCF init for E830 devices Date: Fri, 19 Jul 2024 14:44:27 +0100 Message-Id: <20240719134427.10512-1-ian.stokes@intel.com> X-Mailer: git-send-email 2.35.3 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: Bruce Richardson E830 introduces a new version of Get Link Status Data which increases the size of struct ice_aqc_get_link_status_data from 32 bytes to 56. When initializing DCF, attempt to get link status data using both formats of the command, by overriding the mac type to E830 on failure with the default setting. Signed-off-by: Bruce Richardson Signed-off-by: Ian Stokes --- drivers/net/ice/ice_dcf_parent.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index 4e4a63fdd0..f92bd5e726 100644 --- a/drivers/net/ice/ice_dcf_parent.c +++ b/drivers/net/ice/ice_dcf_parent.c @@ -346,8 +346,19 @@ ice_dcf_init_parent_hw(struct ice_hw *hw) /* Initialize port_info struct with link information */ status = ice_aq_get_link_info(hw->port_info, true, NULL, NULL); - if (status) - goto err_unroll_alloc; + if (status) { + enum ice_mac_type type = hw->mac_type; + + /* DCF uses ICE_MAC_GENERIC which can be talking to either + * E810 or E830. Retry with E830 mac type to ensure correct + * data length is used for IAVF communication with PF. + */ + hw->mac_type = ICE_MAC_E830; + status = ice_aq_get_link_info(hw->port_info, true, NULL, NULL); + hw->mac_type = type; + if (status) + goto err_unroll_alloc; + } status = ice_init_fltr_mgmt_struct(hw); if (status) -- 2.34.1