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 96DA54582E for ; Wed, 21 Aug 2024 10:59:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E33E40E41; Wed, 21 Aug 2024 10:59:00 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2078.outbound.protection.outlook.com [40.107.94.78]) by mails.dpdk.org (Postfix) with ESMTP id D8C234003C for ; Wed, 21 Aug 2024 10:58:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eoJzZraR0YIM86JfEq8YkpX5cYr7nbT4eCStn6bj7G8hqSSP2bOT6KLZeLxpDhVr+ED2/WdkI5fNJV4h2P2AQX5QmckxS7L47Q1TRs9aTDNb7qXzRq/l87Q9cMiGBH+Ivn3hdO9v54S3X+CLMsEhHY5W/OyeMOE9XvWI7UUpDHxZWQI2KZiwaWcdpXyvtkt6tKfUnvUa9U7Pwaa374YJEWYg+C7P/XbR+oaGKiXOC+3/O2aya3qjt7/aDmcKVVxAT8wNSXjtPFxVzRlcTSAlfU5PlDgCv1TGOS6sy/BQiuOgBrBBO9oPaxgp4b73tj8yEH71K1o3/Nu1fO36XtZmyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a2Qpxtt1EmbV4hBVG+VQ4tWM6aqV0XWs4iv701xZ8pI=; b=gxvF4mil59CAY0G2twGLSwcFKn8ByZd+frYMlMXwfAOPnim6EBoboY+B08RQWGTkNp/FNFabF5EjxZg5xld1707fEzobQVZm+N9pFffbjFmlxEGvYwsnnzsSdLGaYTTCEyYqtLnxBGAimpJUIMtjSp5HSTu4CrHuw2fmFyq4KRoR4X6LcqbnkR/G6lau/FBHu49xe2ROn09LAWOBB8YxEurhnYWN44WzJuFpke90fzpri3fF2D/PBxfN/Pn3BObIL4sQgY3VTqRyT4+RZAUTcDy/k/2AvQiuVOrAhxS3NtbF2ecDW/xML4kbCbdZeuwIhjkJ4DhGdn1qcwsAreYdGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a2Qpxtt1EmbV4hBVG+VQ4tWM6aqV0XWs4iv701xZ8pI=; b=uGoDBr/ap4B+bE9GquKcZXwKMK3Bq9u5dtpnQ3bNy3aEbUpkXjGwMTB1EbVwxGQW3oZ0nXVmQkj75op7FuyqKzgw3BKpoRUheXyuFReCDRB1qjWGwvFPG/b+2klS99VKFVKqP62ZaCpK5kHeaDljrA/EG6qb4sqVGu0SsrsNDfPVwMccLtvj/VZrI0DZqmb9XDCFTvzfEQMiNbwYtaKdag8HS9kOIyQueF445xhNI+dOsNfvuA0qIkDY4HfGuutc+lAUN34ssLnF6g8HIXb6EE9koAwrv6icLnBysbsHlaVCAOTE+k3FRx4HrIOGjl1RLdFqlx3V5+87IuSUnLd2Og== Received: from CH3PR12MB8658.namprd12.prod.outlook.com (2603:10b6:610:175::8) by CH3PR12MB8234.namprd12.prod.outlook.com (2603:10b6:610:125::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Wed, 21 Aug 2024 08:58:53 +0000 Received: from CH3PR12MB8658.namprd12.prod.outlook.com ([fe80::d5cc:cc84:5e00:2f42]) by CH3PR12MB8658.namprd12.prod.outlook.com ([fe80::d5cc:cc84:5e00:2f42%5]) with mapi id 15.20.7897.014; Wed, 21 Aug 2024 08:58:52 +0000 From: Xueming Li To: Ian Stokes , "stable@dpdk.org" CC: Tomasz Wakula , Bruce Richardson Subject: Re: [PATCH 23.11] net/ice/base: fix preparing PHY for timesync command Thread-Topic: [PATCH 23.11] net/ice/base: fix preparing PHY for timesync command Thread-Index: AQHa7xTAeNmLt7xlI02tmVa37XLrvLIxcjUW Date: Wed, 21 Aug 2024 08:58:52 +0000 Message-ID: References: <20240815131145.21085-1-ian.stokes@intel.com> In-Reply-To: <20240815131145.21085-1-ian.stokes@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR12MB8658:EE_|CH3PR12MB8234:EE_ x-ms-office365-filtering-correlation-id: f2b9b1a2-7891-4f85-a8ab-08dcc1bf7b32 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?C8Buy9+BGpr/oO5VRmbdWo+D4Ivn78RtutjZSW9aBjUQIPmNPC6z3NNF2IR4?= =?us-ascii?Q?Lz8zm4a2bCaJQ+3zLaPFtvYpZUfZJa1GQzOFDV7lakIJMEanv8LyOlAk8mo6?= =?us-ascii?Q?y3e98sGT+iz9djpLl4ntYLvhtkecNMOUjmk7H3sELPdS8zbU12u+7tDtT2rS?= =?us-ascii?Q?5Gqm+8U7Wcg1MJE84/nfSshSTsNqxRDDimDCezPJdMmaybyTaTQKNCka4dRs?= =?us-ascii?Q?dONctosK+2zLAqppd6OTTvgsrPhY0Esw9F8uWWd78RsUmdh/UeFQKuHswvi2?= =?us-ascii?Q?P3jHCOCKa84I58WXY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gtv?= =?us-ascii?Q?391RpdQ9r3+ltu3T4KspcEeitjcu+vAubk5pV42ExZZE49+sl6eHIzkRA0+r?= =?us-ascii?Q?Wu0rv0VIKxTxJIwsDjY81DV65GMXe8B44axr46mu/oRGQSzJwYTDjDE/8EeM?= =?us-ascii?Q?r0JN88ZofdyKZEyhh9MYD5xKjFELCII0C3gGnXrFg6tFFHViaVcW8Bcs9cmN?= =?us-ascii?Q?3ZuX553E2WBxdqfvHN2agkyQ2e5FePH//Yur+LvMQ85h4Q87jg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB8658.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?arABttUfAZEjVoJGG45VIfcwU3JaPQ5HclhvQdU8uco14HOXbyLgyYQOhyHX?= =?us-ascii?Q?n1BUbC01UsR0wlXOg+J+0Dh9n/KGOvUsA/iC+2yNjNWUte5yDcRdaJh7AT9g?= =?us-ascii?Q?/5siHRl2OZuLwryE0qzioEmYWTVQWimrwDGEx9sK1cUCXxO8/VtTKtqBSQsn?= =?us-ascii?Q?H4s2Gbb5vnIWSeNPdZok/2t+X0ws8DmmmnY1DwAsAg4IdpjyJNBViyt6Sndn?= =?us-ascii?Q?lHDWkI/SniZx/hVnzcJXsytJv/pZKKuxaGZn6VLQph07LImd4EjE4o5K8S67?= =?us-ascii?Q?2oKTGebvm+HRK6nrZuZOfD9KGHzwR+9Rccd/f4KP2V34uGPThYGw6RC5OtJu?= =?us-ascii?Q?lxs3Z643vdfilZa7dfwdmpuZApeqKwXqT/n+R7Gh69djD04vVL83VPxdeMYB?= =?us-ascii?Q?doV2UuUTPp+PLOPMD6VXG7RzJGSa20fRxisJissvE6VJbNbBHGtzGmRTsl0W?=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CZ6Otf7LQgZ12ZrzV8LkX8IVI+aGUkH7?= =?us-ascii?Q?ShkHEE+idynODmV8Xk/whxzWMWRUQguKWsv9R+qgLZ4I/YxqaCpncKPbYOv0?= =?us-ascii?Q?L/XSUGWb7aSok2D2gca+8rDzW81L9QdcobPHnaT2p9pmHPUrhKupK0hl9c9t?= =?us-ascii?Q?saBHAuBRZQhx168vGCyJiRAy5bV5dig9eHH3Jk074U4gbhxlBeIcC2kVUHET?= =?us-ascii?Q?8gaWFE2h1LAOeQVmTy+RqyRKMV/q3fjvKQhlx5Hu?= Content-Type: multipart/alternative; boundary="_000_CH3PR12MB86580452F0E5B000D2D783CAA18E2CH3PR12MB8658namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8658.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2b9b1a2-7891-4f85-a8ab-08dcc1bf7b32 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2024 08:58:52.9268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QI6S7n1HFL0kLMXjD3zjB3Npnif3phGCdp8YcMgGizOZCqZAqJ1uVaLPfp507/Cagt5Mr69blDhHCI+Oaxs5Ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8234 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 --_000_CH3PR12MB86580452F0E5B000D2D783CAA18E2CH3PR12MB8658namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ian, Thanks for your help, patch enqueued to LTS release candidates. Best Regards, Xueming ________________________________ From: Ian Stokes Sent: Thursday, August 15, 2024 9:11 PM To: stable@dpdk.org Cc: Tomasz Wakula ; Ian Stokes ; Bruce Richardson Subject: [PATCH 23.11] net/ice/base: fix preparing PHY for timesync command 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_p= tp_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 &=3D ~TS_CMD_MASK; val |=3D cmd_val; - status =3D ice_write_phy_reg_e822_lp(hw, port, P_REG_TX_TMR_CMD, va= l, - lock_sbq); + status =3D 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_CM= D, status %d\n", status); diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_p= tp_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 --_000_CH3PR12MB86580452F0E5B000D2D783CAA18E2CH3PR12MB8658namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Ian,

Thanks for your help, patch enqueued to LTS release candidates.

Best Regards,
Xueming

From: Ian Stokes <ian.st= okes@intel.com>
Sent: Thursday, August 15, 2024 9:11 PM
To: stable@dpdk.org <stable@dpdk.org>
Cc: Tomasz Wakula <tomaszx.wakula@intel.com>; Ian Stokes <i= an.stokes@intel.com>; Bruce Richardson <bruce.richardson@intel.com>= ;
Subject: [PATCH 23.11] net/ice/base: fix preparing PHY for timesync = command
 
From: Tomasz Wakula <tomaszx.wakula@intel.com&g= t;

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 con= trol")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Wakula <tomaszx.wakula@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 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_p= tp_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 &=3D ~TS_CMD_MASK;=
         val |=3D cmd_val;
 
-       status =3D ice_write_phy_reg_e822_lp(= hw, port, P_REG_TX_TMR_CMD, val,
-            &n= bsp;            = ;            &n= bsp;    lock_sbq);
+       status =3D ice_write_phy_reg_e822_lp(= hw, port, P_REG_TX_TMR_CMD,
+            &n= bsp;            = ;            &n= bsp; val | TS_CMD_RX_TYPE, lock_sbq);
         if (status) {
            &nb= sp;    ice_debug(hw, ICE_DBG_PTP, "Failed to write back= TX_TMR_CMD, status %d\n",
            &nb= sp;            =   status);
diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_p= tp_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       &nb= sp;        0xFF
 #define TS_CMD_MASK        &n= bsp;            0xF<= br>  #define SYNC_EXEC_CMD        =            0x3
+#define TS_CMD_RX_TYPE_S        &n= bsp;      0x4
+#define TS_CMD_RX_TYPE        &nbs= p;        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

--_000_CH3PR12MB86580452F0E5B000D2D783CAA18E2CH3PR12MB8658namp_--