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 8760C455AD for ; Mon, 15 Jul 2024 17:29:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 834FA40DCE; Mon, 15 Jul 2024 17:29:56 +0200 (CEST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mails.dpdk.org (Postfix) with ESMTP id C4BDE40BA0 for ; Mon, 15 Jul 2024 17:29:55 +0200 (CEST) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52ea2b6a9f5so4602123e87.0 for ; Mon, 15 Jul 2024 08:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057395; x=1721662195; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hDnjGYDyfTcvOwewPPHoJix8nr8nnNmA2HJv/iz6FCM=; b=AJzYTsCVhjQBH5snW3WE0rHjixV2Noo3LPmfraH0ogN2ZAXq6cUafntl0k/slUuFuG /R9gRLbiovu2M9+G1F8ByDqAbYT1FxwGxP8mlqOHa7InpQVrh5pbZt3nlu5sV4nHIjN6 V6IxpWREGqyweuojFXY+6hdoaPefL83nRa2Da5c6tnVEl4Gu9T/Gbav8AX8iwz1+gWtx Bv3eZcilCm+uhguMw/RezFMXQNbaYr9LQFUQz9LVx+wFhx94aBTB2qnMfnAa7atIv/s+ N+3wqavVygLeJTKAJcUw7nhaQ//Cqhp25Q5+Tfe5h8iGbILCgKV222KCEz+0C9BwOWnW LJTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057395; x=1721662195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hDnjGYDyfTcvOwewPPHoJix8nr8nnNmA2HJv/iz6FCM=; b=aFu/etTw4/RKiADqWkKq2ObCJ6N2BPfd8EErY8/RaMxI34Z7iW2ktOfe65CjZOk3aO ycuEpUBxvubsY8Nd4TYKISzQs+3XtwMqblqRr22HOZRpzoDEtGPOU2rSn+pcMMT1QgrE ew9lKhkbs0VlzN3bRHdgIcGHNg65RxB+yIj3znVhaQu3wz22GjRIHaTnvua0DZ68Il4K rDyPrGh4WGtoRVgOp4r8JFkLlO0JVaXKERrQohPI8+6lcqiklxKRjhbpyspsHBsjYYVY fGuLlXWKEtqss1mfX0QZhRPMjHjwRQE0J3P7VjfLBZIyzFu7UBnJhDQlIObnQJ0aSE4Y BEVQ== X-Forwarded-Encrypted: i=1; AJvYcCW/Hlr5TT9ovI9vbGR1uNzjsuPUGb5v6jNn2/6TtHwbRqWs2G7+a/bptd1oisKAslyJSCbeVnTWGULhWdbhEaw= X-Gm-Message-State: AOJu0Yz5ubZGT7fmpxPPSY6aTQV+q1pp8s9ZDYYfrnmuIigVBO81OyTH Fh5sFV1d126B0UiUBevMCV/oZATbSTRZVhFWeazO3nmBOLp5edMTfPtjmNwrshw= X-Google-Smtp-Source: AGHT+IE42Fbjyf1RRlQ6srGvyGqozGndGS2c9iDnkaoTSB1Hkl1MuDaJ4Six8iG+Is9uIND1SXUMdA== X-Received: by 2002:a05:6512:3d8a:b0:52c:8aa6:4e9d with SMTP id 2adb3069b0e04-52eb99a2b76mr14596001e87.29.1721057395130; Mon, 15 Jul 2024 08:29:55 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f2cc229sm126559945e9.38.2024.07.15.08.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:54 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Wakula Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix preparing PHY for timesync command' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:31 +0100 Message-Id: <20240715152704.2229503-53-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> 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 Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/44cb540275af7023dc6f3f6c24c009ad8af5d429 Thanks. Luca Boccassi --- >From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001 From: Tomasz Wakula Date: Wed, 26 Jun 2024 12:41:46 +0100 Subject: [PATCH] net/ice/base: fix preparing PHY for timesync command [ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ] 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") 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 | 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 a0b8af1b94..0f02d2fcbe 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -2839,8 +2839,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_RX_TMR_CMD, val, - lock_sbq); + status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, + val | TS_CMD_RX_TYPE, lock_sbq); if (status) { ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_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 09c236e7e0..c2a3e53103 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -295,6 +295,9 @@ 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.304930915 +0100 +++ 0053-net-ice-base-fix-preparing-PHY-for-timesync-command.patch 2024-07-15 16:19:34.620207573 +0100 @@ -1 +1 @@ -From df44ba7a3c8e0dfa409b085d153f5473e60c9908 Mon Sep 17 00:00:00 2001 +From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 8ea4e77266..0c8c339022 100644 +index a0b8af1b94..0f02d2fcbe 100644 @@ -25,2 +26,3 @@ -@@ -3164,8 +3164,8 @@ ice_ptp_write_port_cmd_e822(struct ice_hw *hw, u8 port, - } +@@ -2839,8 +2839,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; @@ -28,8 +30,7 @@ - /* 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); +- status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val, +- lock_sbq); ++ status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, ++ val | TS_CMD_RX_TYPE, lock_sbq); + if (status) { + ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, status %d\n", + status); @@ -37 +38 @@ -index 4c63bba722..ff7719f16a 100644 +index 09c236e7e0..c2a3e53103 100644 @@ -40 +41 @@ -@@ -324,6 +324,9 @@ int ice_ptp_init_phy_cfg(struct ice_hw *hw); +@@ -295,6 +295,9 @@ enum ice_status ice_ptp_init_phy_cfg(struct ice_hw *hw);