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 30D8AA00C3; Mon, 15 Aug 2022 01:23:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7394D42C08; Mon, 15 Aug 2022 01:22:44 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0F863400EF for ; Mon, 15 Aug 2022 01:22:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660519363; x=1692055363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PCUrmwddkl2HdID46+XQ9JFWrB8cfoyCZOQ1zrBEuFo=; b=d97ix1QoXNmT1pK+wyvtvpeCBpbjTSq27UDJp7jeQBnhBLMvKWQM4Jxu dEPdjy9hVEPZFWvhvqEM5XSvrc3Tl5oF1IvRhGUu8e8n3/EPC6kTz7lsK uyUPV+ZLiHqxEwR6BA3mGrxCJCurjsxQYX4YgOCgqVe1FugfnvpYdi0+a IOxi0b2k/mxwCrQaGsA6E1zc+HSagxfTtMz4yIcIow5gsUvUm34//Tp3S 8SE93UwEROMioUmr16oU76XNSUEtAW5X+ywsOY8jTvwi+Sv5M3qA0ZvOZ 2HpxaSEJKI5BXCKoOL+H1D96rLWMcAaTCFlWMCri92YssY4gK6oyiEwrz Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="291857938" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="291857938" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:22:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="635283076" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by orsmga008.jf.intel.com with ESMTP; 14 Aug 2022 16:22:40 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Sergey Temerkhanov Subject: [PATCH v2 17/70] net/ice/base: work around missing PTP caps Date: Mon, 15 Aug 2022 03:31:13 -0400 Message-Id: <20220815073206.2917968-18-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815073206.2917968-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> <20220815073206.2917968-1-qi.z.zhang@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 Provide a WA for missing PTP caps on Simics, this code shall be removed after cap reporting is fixed Signed-off-by: Sergey Temerkhanov Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index e22600c46d..cedce2dcf5 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -2516,7 +2516,12 @@ ice_parse_1588_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p, struct ice_aqc_list_caps_elem *cap) { struct ice_ts_func_info *info = &func_p->ts_func_info; - u32 number = LE32_TO_CPU(cap->number); + u32 number = ICE_TS_FUNC_ENA_M | ICE_TS_SRC_TMR_OWND_M | + ICE_TS_TMR_ENA_M | ICE_TS_TMR_IDX_OWND_M | + ICE_TS_TMR_IDX_ASSOC_M; + u8 clk_freq; + + ice_debug(hw, ICE_DBG_INIT, "1588 func caps: raw value %x\n", number); info->ena = ((number & ICE_TS_FUNC_ENA_M) != 0); func_p->common_cap.ieee_1588 = info->ena; -- 2.31.1