net/igc: fix disabling timesync

Message ID 20240315010631.1374624-1-wenwux.ma@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers
Series net/igc: fix disabling timesync |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Ma, WenwuX March 15, 2024, 1:06 a.m. UTC
  When disabling timesync, we should clear the IGC_RXPBS_CFG_TS_EN bit
of IGC_RXPBS, the patch fixes this.

Fixes: 4f6fbbf6f17d ("net/igc: support IEEE 1588 PTP")
Cc: stable@dpdk.org

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Liao, TingtingX March 18, 2024, 4:11 a.m. UTC | #1
Tested-by: Tingting Liao <tingtingx.liao@intel.com>
________________________________
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Friday, March 15, 2024 09:06
> To: dev@dpdk.org <dev@dpdk.org>; Guo, Junfeng <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Cc: Liao, TingtingX <tingtingx.liao@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>; stable@dpdk.org <stable@dpdk.org>
> Subject: [PATCH] net/igc: fix disabling timesync
>
> When disabling timesync, we should clear the IGC_RXPBS_CFG_TS_EN bit
> of IGC_RXPBS, the patch fixes this.
>
> Fixes: 4f6fbbf6f17d ("net/igc: support IEEE 1588 PTP")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
  
Bruce Richardson March 19, 2024, 3:14 p.m. UTC | #2
On Mon, Mar 18, 2024 at 04:11:14AM +0000, Liao, TingtingX wrote:
>    Tested-by: Tingting Liao <tingtingx.liao@intel.com>
>      __________________________________________________________________
> 
>    > -----Original Message-----
> 
>    > From: Ma, WenwuX <wenwux.ma@intel.com>
> 
>    > Sent: Friday, March 15, 2024 09:06
> 
>    > To: dev@dpdk.org <dev@dpdk.org>; Guo, Junfeng
>    <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> 
>    > Cc: Liao, TingtingX <tingtingx.liao@intel.com>; Ma, WenwuX
>    <wenwux.ma@intel.com>; stable@dpdk.org <stable@dpdk.org>
> 
>    > Subject: [PATCH] net/igc: fix disabling timesync
> 
>    >
> 
>    > When disabling timesync, we should clear the IGC_RXPBS_CFG_TS_EN bit
> 
>    > of IGC_RXPBS, the patch fixes this.
> 
>    >
> 
>    > Fixes: 4f6fbbf6f17d ("net/igc: support IEEE 1588 PTP")
> 
>    > Cc: stable@dpdk.org
> 
>    >
> 
>    > Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
>

This seems a small enough, low-risk fix, so applying to
dpdk-next-net-intel.

Thanks,
/Bruce
  

Patch

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 58c4f80927..690736b6d1 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -2853,7 +2853,7 @@  eth_igc_timesync_disable(struct rte_eth_dev *dev)
 	IGC_WRITE_REG(hw, IGC_TSYNCRXCTL, 0);
 
 	val = IGC_READ_REG(hw, IGC_RXPBS);
-	val &= IGC_RXPBS_CFG_TS_EN;
+	val &= ~IGC_RXPBS_CFG_TS_EN;
 	IGC_WRITE_REG(hw, IGC_RXPBS, val);
 
 	val = IGC_READ_REG(hw, IGC_SRRCTL(0));