All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
@ 2023-01-09 14:41 Noor Azura Ahmad Tarmizi
  0 siblings, 0 replies; 7+ messages in thread
From: Noor Azura Ahmad Tarmizi @ 2023-01-09 14:41 UTC (permalink / raw)
  To: Noor Azura Ahmad Tarmizi; +Cc: Noor Azura Ahmad Tarmizi, stable

Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
(ATSFC) to clear. This is to ensure no residue fifo value is being read
erroneously.

Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index fc06ddeac0d5..b4388ca8d211 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -210,7 +210,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
 		}
 		writel(acr_value, ptpaddr + PTP_ACR);
 		mutex_unlock(&priv->aux_ts_lock);
-		ret = 0;
+		/* wait for auxts fifo clear to finish */
+		ret = readl_poll_timeout(ptpaddr + PTP_ACR, acr_value,
+					 !(acr_value & PTP_ACR_ATSFC),
+					 10, 10000);
 		break;
 
 	default:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
  2023-01-11  5:02 ` Noor Azura Ahmad Tarmizi
@ 2023-01-12  5:20   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-12  5:20 UTC (permalink / raw)
  To: Noor Azura Ahmad Tarmizi
  Cc: davem, peppe.cavallaro, alexandre.torgue, joabreu, edumazet,
	kuba, pabeni, mcoquelin.stm32, richardcochran, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	noor.azura.ahmad.tarmizi, tee.min.tan, hong.aun.looi,
	muhammad.husaini.zulkifli, stable

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 11 Jan 2023 13:02:00 +0800 you wrote:
> Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
> (ATSFC) to clear. This is to ensure no residue fifo value is being read
> erroneously.
> 
> Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
> 
> [...]

Here is the summary with links:
  - [net,v2,1/1] net: stmmac: add aux timestamps fifo clearance wait
    https://git.kernel.org/netdev/net/c/ae9dcb91c606

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
@ 2023-01-12  5:20   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-12  5:20 UTC (permalink / raw)
  To: Noor Azura Ahmad Tarmizi
  Cc: davem, peppe.cavallaro, alexandre.torgue, joabreu, edumazet,
	kuba, pabeni, mcoquelin.stm32, richardcochran, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	noor.azura.ahmad.tarmizi, tee.min.tan, hong.aun.looi,
	muhammad.husaini.zulkifli, stable

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 11 Jan 2023 13:02:00 +0800 you wrote:
> Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
> (ATSFC) to clear. This is to ensure no residue fifo value is being read
> erroneously.
> 
> Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
> 
> [...]

Here is the summary with links:
  - [net,v2,1/1] net: stmmac: add aux timestamps fifo clearance wait
    https://git.kernel.org/netdev/net/c/ae9dcb91c606

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
@ 2023-01-11  5:02 ` Noor Azura Ahmad Tarmizi
  0 siblings, 0 replies; 7+ messages in thread
From: Noor Azura Ahmad Tarmizi @ 2023-01-11  5:02 UTC (permalink / raw)
  To: David S . Miller, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Richard Cochran
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Noor Azura Ahmad Tarmizi, Tan Tee Min, Looi Hong Aun,
	Muhammad Husaini Zulkifli, Noor Azura Ahmad Tarmizi, stable

Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
(ATSFC) to clear. This is to ensure no residue fifo value is being read
erroneously.

Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index fc06ddeac0d5..b4388ca8d211 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -210,7 +210,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
 		}
 		writel(acr_value, ptpaddr + PTP_ACR);
 		mutex_unlock(&priv->aux_ts_lock);
-		ret = 0;
+		/* wait for auxts fifo clear to finish */
+		ret = readl_poll_timeout(ptpaddr + PTP_ACR, acr_value,
+					 !(acr_value & PTP_ACR_ATSFC),
+					 10, 10000);
 		break;
 
 	default:
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
@ 2023-01-11  5:02 ` Noor Azura Ahmad Tarmizi
  0 siblings, 0 replies; 7+ messages in thread
From: Noor Azura Ahmad Tarmizi @ 2023-01-11  5:02 UTC (permalink / raw)
  To: David S . Miller, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Richard Cochran
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Noor Azura Ahmad Tarmizi, Tan Tee Min, Looi Hong Aun,
	Muhammad Husaini Zulkifli, Noor Azura Ahmad Tarmizi, stable

Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
(ATSFC) to clear. This is to ensure no residue fifo value is being read
erroneously.

Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index fc06ddeac0d5..b4388ca8d211 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -210,7 +210,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
 		}
 		writel(acr_value, ptpaddr + PTP_ACR);
 		mutex_unlock(&priv->aux_ts_lock);
-		ret = 0;
+		/* wait for auxts fifo clear to finish */
+		ret = readl_poll_timeout(ptpaddr + PTP_ACR, acr_value,
+					 !(acr_value & PTP_ACR_ATSFC),
+					 10, 10000);
 		break;
 
 	default:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
  2023-01-09 14:44 Noor Azura Ahmad Tarmizi
@ 2023-01-10  8:06 ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2023-01-10  8:06 UTC (permalink / raw)
  To: Noor Azura Ahmad Tarmizi; +Cc: Noor Azura Ahmad Tarmizi, stable

On Mon, Jan 09, 2023 at 10:44:39PM +0800, Noor Azura Ahmad Tarmizi wrote:
> Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
> (ATSFC) to clear. This is to ensure no residue fifo value is being read
> erroneously.
> 
> Cc: <stable@vger.kernel.org> # 5.10.x
> Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
> ---
> v1 -> v2: Test update to version 2
> 
>  drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait
@ 2023-01-09 14:44 Noor Azura Ahmad Tarmizi
  2023-01-10  8:06 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Noor Azura Ahmad Tarmizi @ 2023-01-09 14:44 UTC (permalink / raw)
  To: Noor Azura Ahmad Tarmizi; +Cc: Noor Azura Ahmad Tarmizi, stable

Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
(ATSFC) to clear. This is to ensure no residue fifo value is being read
erroneously.

Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
---
v1 -> v2: Test update to version 2

 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index fc06ddeac0d5..b4388ca8d211 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -210,7 +210,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
 		}
 		writel(acr_value, ptpaddr + PTP_ACR);
 		mutex_unlock(&priv->aux_ts_lock);
-		ret = 0;
+		/* wait for auxts fifo clear to finish */
+		ret = readl_poll_timeout(ptpaddr + PTP_ACR, acr_value,
+					 !(acr_value & PTP_ACR_ATSFC),
+					 10, 10000);
 		break;
 
 	default:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-12  5:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 14:41 [PATCH net v2 1/1] net: stmmac: add aux timestamps fifo clearance wait Noor Azura Ahmad Tarmizi
2023-01-09 14:44 Noor Azura Ahmad Tarmizi
2023-01-10  8:06 ` Greg KH
2023-01-11  5:02 Noor Azura Ahmad Tarmizi
2023-01-11  5:02 ` Noor Azura Ahmad Tarmizi
2023-01-12  5:20 ` patchwork-bot+netdevbpf
2023-01-12  5:20   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.