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 25F3F457D5 for ; Thu, 15 Aug 2024 15:12:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FE7F4027E; Thu, 15 Aug 2024 15:12:11 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id 109194025F for ; Thu, 15 Aug 2024 15:12:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723727530; x=1755263530; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=uBcgaHmwtU3TT0fn4cjebep8UPJOv4plhgf9zsbeoL0=; b=ExmHbIEQe25RKzRuchyKil/n5EawayypVjyOg6v4cAydOMnr94LNkwsS aYn41bm+cFpnD8v5rvlPXrqDepMqt9rMnDQ2cAnSqVkzplOvms4OwfYw0 Jpi5IP1sAKdknY4ZVFQNAPlwI6tJQsDkfJgvQ3gek/89hxJwCd93NRKi2 X3NekZIa9noY6EfsSrEbPVXXokRlCesJV8rZxPyn4I68YwlB5vhyTBxXY jauQNwI19aotW3TLscskZZvrXnCxDPJ6VH+VKvy8YdRRIkwTEXD27huzi 79CcQYae2EHzsDCucPwF1IHobe4VIoe/kIkjbjIHdxmVk4oW86HByZ5p5 Q==; X-CSE-ConnectionGUID: UeEe6NZdS+m1+HJjQ1a6ng== X-CSE-MsgGUID: Ot7vIROWTSmk0Te/WTm55A== X-IronPort-AV: E=McAfee;i="6700,10204,11165"; a="22130273" X-IronPort-AV: E=Sophos;i="6.10,149,1719903600"; d="scan'208";a="22130273" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2024 06:12:08 -0700 X-CSE-ConnectionGUID: j6rpmoshT4CBhdnCm1Ihgw== X-CSE-MsgGUID: CCaXytHjRjeSkeOI9FRxsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,149,1719903600"; d="scan'208";a="90051490" Received: from sivswdev19.ir.intel.com ([10.237.217.69]) by orviesa002.jf.intel.com with ESMTP; 15 Aug 2024 06:11:56 -0700 From: Ian Stokes To: stable@dpdk.org Cc: Tomasz Wakula , Ian Stokes , Bruce Richardson Subject: [PATCH 23.11] net/ice/base: fix preparing PHY for timesync command Date: Thu, 15 Aug 2024 14:11:45 +0100 Message-Id: <20240815131145.21085-1-ian.stokes@intel.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Tomasz Wakula When preparing a port for timesync command SW should 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. Fixes: 97f4f78bbd9f ("net/ice/base: add functions for device clock control") Cc: stable@dpdk.org Signed-off-by: Tomasz Wakula Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_ptp_hw.c | 4 ++-- drivers/net/ice/base/ice_ptp_hw.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index 548ef5e820..c507f211df 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -2817,8 +2817,8 @@ ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd, val &= ~TS_CMD_MASK; val |= cmd_val; - status = ice_write_phy_reg_e822_lp(hw, port, P_REG_TX_TMR_CMD, val, - lock_sbq); + status = ice_write_phy_reg_e822_lp(hw, port, P_REG_TX_TMR_CMD, + val | TS_CMD_RX_TYPE, lock_sbq); if (status) { ice_debug(hw, ICE_DBG_PTP, "Failed to write back TX_TMR_CMD, status %d\n", status); diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h index 3667c9882d..f53b9e3ecc 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -295,6 +295,8 @@ enum ice_status 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.34.1