* [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt
@ 2023-12-18 7:51 Lai Peter Jun Ann
2023-12-18 20:48 ` Jacob Keller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lai Peter Jun Ann @ 2023-12-18 7:51 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Song Yoong Siang, Lai Peter Jun Ann
The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
flag is set.
Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
Cc: <stable@vger.kernel.org> # 6.6
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
---
v2 changelog:
- Add fix tag and stable@vger.kernel.org in email cc list.
---
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
index 540f6a4..f05bd75 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
@@ -237,7 +237,7 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
*/
ts_status = readl(priv->ioaddr + GMAC_TIMESTAMP_STATUS);
- if (priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN)
+ if (!(priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN))
return;
num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt
2023-12-18 7:51 [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt Lai Peter Jun Ann
@ 2023-12-18 20:48 ` Jacob Keller
2023-12-19 15:53 ` Serge Semin
2023-12-20 11:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jacob Keller @ 2023-12-18 20:48 UTC (permalink / raw)
To: Lai Peter Jun Ann, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Song Yoong Siang
On 12/17/2023 11:51 PM, Lai Peter Jun Ann wrote:
> The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
> flag is set.
>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
> Cc: <stable@vger.kernel.org> # 6.6
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
> ---
> v2 changelog:
> - Add fix tag and stable@vger.kernel.org in email cc list.
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> index 540f6a4..f05bd75 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> @@ -237,7 +237,7 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
> */
> ts_status = readl(priv->ioaddr + GMAC_TIMESTAMP_STATUS);
>
> - if (priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN)
> + if (!(priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN))
> return;
>
> num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt
2023-12-18 7:51 [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt Lai Peter Jun Ann
2023-12-18 20:48 ` Jacob Keller
@ 2023-12-19 15:53 ` Serge Semin
2023-12-20 11:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Serge Semin @ 2023-12-19 15:53 UTC (permalink / raw)
To: Lai Peter Jun Ann
Cc: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, netdev, linux-stm32,
linux-arm-kernel, linux-kernel, Song Yoong Siang
On Mon, Dec 18, 2023 at 03:51:32PM +0800, Lai Peter Jun Ann wrote:
> The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
> flag is set.
>
> Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
> Cc: <stable@vger.kernel.org> # 6.6
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
Right. The blamed commit has wrongly converted that conditional
statement.
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
-Serge(y)
> ---
> v2 changelog:
> - Add fix tag and stable@vger.kernel.org in email cc list.
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> index 540f6a4..f05bd75 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
> @@ -237,7 +237,7 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
> */
> ts_status = readl(priv->ioaddr + GMAC_TIMESTAMP_STATUS);
>
> - if (priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN)
> + if (!(priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN))
> return;
>
> num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt
2023-12-18 7:51 [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt Lai Peter Jun Ann
2023-12-18 20:48 ` Jacob Keller
2023-12-19 15:53 ` Serge Semin
@ 2023-12-20 11:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-12-20 11:30 UTC (permalink / raw)
To: Lai Peter Jun Ann
Cc: alexandre.torgue, joabreu, davem, edumazet, kuba, pabeni,
mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
linux-kernel, yoong.siang.song
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 18 Dec 2023 15:51:32 +0800 you wrote:
> The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
> flag is set.
>
> Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
> Cc: <stable@vger.kernel.org> # 6.6
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
>
> [...]
Here is the summary with links:
- [net,v2,1/1] net: stmmac: fix incorrect flag check in timestamp interrupt
https://git.kernel.org/netdev/net/c/bd7f77dae695
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] 4+ messages in thread
end of thread, other threads:[~2023-12-20 11:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18 7:51 [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt Lai Peter Jun Ann
2023-12-18 20:48 ` Jacob Keller
2023-12-19 15:53 ` Serge Semin
2023-12-20 11:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox