aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLai Peter Jun Ann <[email protected]>2023-12-18 07:51:32 +0000
committerDavid S. Miller <[email protected]>2023-12-20 11:21:10 +0000
commitbd7f77dae69532ffc027ee50ff99e3792dc30b7f (patch)
tree3039bee61c4bec18f733867b0d23ea456ab8e08b
parentMerge tag 'for-net-2023-12-15' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadkernel-bd7f77dae69532ffc027ee50ff99e3792dc30b7f.tar.gz
kernel-bd7f77dae69532ffc027ee50ff99e3792dc30b7f.zip
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]> Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Serge Semin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
index 540f6a4ec0b8..f05bd757dfe5 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) >>