patch 'net/ice/base: fix preparing PHY for timesync command' has been queued to stable release 22.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 15 17:26:31 CEST 2024


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 <tomaszx.wakula at intel.com>
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 <tomaszx.wakula at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 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 at 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);


More information about the stable mailing list