2023-12-18 07:51:55

by Lai Peter Jun Ann

[permalink] [raw]
Subject: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt

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: <[email protected]> # 6.6
Signed-off-by: Song Yoong Siang <[email protected]>
Signed-off-by: Lai Peter Jun Ann <[email protected]>
---
v2 changelog:
- Add fix tag and [email protected] 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



2023-12-18 20:49:48

by Jacob Keller

[permalink] [raw]
Subject: Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt



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 <[email protected]>

> Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
> Cc: <[email protected]> # 6.6
> Signed-off-by: Song Yoong Siang <[email protected]>
> Signed-off-by: Lai Peter Jun Ann <[email protected]>
> ---
> v2 changelog:
> - Add fix tag and [email protected] 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) >>

2023-12-19 15:54:13

by Serge Semin

[permalink] [raw]
Subject: Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt

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: <[email protected]> # 6.6
> Signed-off-by: Song Yoong Siang <[email protected]>
> Signed-off-by: Lai Peter Jun Ann <[email protected]>

Right. The blamed commit has wrongly converted that conditional
statement.

Reviewed-by: Serge Semin <[email protected]>

-Serge(y)

> ---
> v2 changelog:
> - Add fix tag and [email protected] 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
>
>

2023-12-20 11:30:35

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net v2 1/1] net: stmmac: fix incorrect flag check in timestamp interrupt

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

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: <[email protected]> # 6.6
> Signed-off-by: Song Yoong Siang <[email protected]>
> Signed-off-by: Lai Peter Jun Ann <[email protected]>
>
> [...]

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