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 6A5DB4404F; Wed, 12 Jun 2024 17:19:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6619D42F3B; Wed, 12 Jun 2024 17:05:59 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id A01C742EF8 for ; Wed, 12 Jun 2024 17:05:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204755; x=1749740755; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HxwdPlv6Z+urX4m0/Q/msvY0h/5j0HxcbIpPl/FKSuE=; b=UiWnkJshqVsdCAbc1FRNh8qdjXGKIx+2mpj+wmufOBD+K4/g+4otljqA 8poPZz9geIBHdU8ZovLTw2C4fARtNoB6BWF3qxUw6NjcjmLrYrv8oxWqU 85hChMpU5VGDFGGc+QVjcl4S8PvBPzv30PzYXOMCI9o7HQI64KhAYZzbJ Hb2HVypkXAK+KhPTkEI2fRee4ylcWLz59peyp+7l4rioR5f4zcrEK3K0u cl/XG9k+vbpb8pQ1jCZiKfvQXmI4kDuQZNg76QuXav5Q6cmOBQOyEZ4Is yNnXxKn3P/TOWV53GGAYbH6uPbtRBKe/ShM69bZBr27vkJf5OgOdcSKGR A==; X-CSE-ConnectionGUID: u6NNa/mNR/2CLUrhbbhftg== X-CSE-MsgGUID: rD66alXIQk+CFxwAJzkefQ== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459809" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459809" 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:05:54 -0700 X-CSE-ConnectionGUID: AsGi5zSJR4imOGITylpDRg== X-CSE-MsgGUID: ezqn6VepQvOyJ5JUuxUyVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925709" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:53 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Tomaszx Wakula Subject: [PATCH v2 096/148] net/ice/base: fix for preparing PHY for timesync command Date: Wed, 12 Jun 2024 16:01:30 +0100 Message-ID: <591ec581f1428330db4045e6810b1617b37f7fa9.1718204529.git.anatoly.burakov@intel.com> 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 Preparing a port for timesync command procedure shall provide Rx type which indicates the type for the Rx metadata in the ONPI interface. According to the documentation, Rx type should always equal 0x18. Signed-off-by: Tomaszx Wakula Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 4 ++-- drivers/net/ice/base/ice_ptp_hw.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index c01d0c8045..52a6178fd4 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -3255,8 +3255,8 @@ ice_ptp_write_port_cmd_e822(struct ice_hw *hw, u8 port, } /* Rx case */ - err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val, - lock_sbq); + err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, + val | TS_CMD_RX_TYPE, lock_sbq); if (err) { ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, err %d\n", err); diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h index 0da20e6758..b1a53e7252 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -329,6 +329,9 @@ int ice_ptp_init_phy_cfg(struct ice_hw *hw); #define TS_CMD_MASK_E810 0xFF #define TS_CMD_MASK 0xF #define SYNC_EXEC_CMD 0x3 +#define TS_CMD_RX_TYPE_S 0x4 +#define TS_CMD_RX_TYPE MAKEMASK(0x18, TS_CMD_RX_TYPE_S) + /* Macros to derive port low and high addresses on both quads */ #define P_Q0_L(a, p) ((((a) + (0x2000 * (p)))) & 0xFFFF) -- 2.43.0