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 8313B45501; Wed, 26 Jun 2024 14:01:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70E4A43417; Wed, 26 Jun 2024 13:56:07 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 7158942EF4 for ; Wed, 26 Jun 2024 13:44:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402277; x=1750938277; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DKWIglCDg9hT8yG44hY78DvGMJBDkV0l/CcgsqsfIIU=; b=eUA4qAUrNzFMPAIvp2m8foeZRAliEjGoFIdeuwDtYLLdtqs2DSHY+wem UP0YAUKyHZ51os+3dK4K91YsCsCUyoMsXJAaHJGXzuoGnu3MZC1FXzuQe bAVzNZSHB8H2M5tdoneQ7P4THTjaEQ71/ks5bObTy6JRVkaMp0fMmtNXg lZBgU5wy/9O72pXkTECndharewhPGbwd+mupyBgpjcOjXbHP/lY3W1GfB FYAY6PPkE3YNY8OUALk5fA32L0tX6PD8cxbdlHSIyFsNjujQwXDuW5wV0 rkXiTdBQxnuBt3QYTRm5CdovRN3cejzWaGTLowILgdSvvS9wEvFTDp2JH w==; X-CSE-ConnectionGUID: zQyX+eABRFSXfT7KVkVG5g== X-CSE-MsgGUID: 3nrwTjKARqaJbhSx9Tx4Gw== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979451" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979451" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:44:37 -0700 X-CSE-ConnectionGUID: oLnnz60WSxqGbPKnJCizZg== X-CSE-MsgGUID: oIsOpscoRnyIMzS3XAnSGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43874012" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:44:36 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Tomaszx Wakula , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 058/103] net/ice/base: fix for preparing PHY for timesync command Date: Wed, 26 Jun 2024 12:41:46 +0100 Message-ID: <5ae11f242d3f0ec79cca366a10e57b33153e95b9.1719401848.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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: Tomaszx Wakula 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 8ea4e77266..0c8c339022 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -3164,8 +3164,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 4c63bba722..ff7719f16a 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -324,6 +324,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