summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLai Peter Jun Ann <jun.ann.lai@intel.com>2023-12-18 10:51:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-01 15:42:42 +0300
commit93f763c28a8b7070ea2730c651a954e120c807bd (patch)
tree28592f8a6d55fb6ca38c9f273ca937cd82211daa /drivers
parent92b8881bf77651360cfaa142f5e79c1dfbb66713 (diff)
downloadlinux-93f763c28a8b7070ea2730c651a954e120c807bd.tar.xz
net: stmmac: fix incorrect flag check in timestamp interrupt
commit bd7f77dae69532ffc027ee50ff99e3792dc30b7f upstream. 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> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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) >>