diff mbox series

[net,1/1] net: stmmac: fix incorrect flag check in timestamp interrupt

Message ID 1702883201-29632-1-git-send-email-jun.ann.lai@intel.com (mailing list archive)
State New, archived
Headers show
Series [net,1/1] net: stmmac: fix incorrect flag check in timestamp interrupt | expand

Commit Message

Lai Peter Jun Ann Dec. 18, 2023, 7:06 a.m. UTC
The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
flag is set.

Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Suman Ghosh Dec. 18, 2023, 11:39 a.m. UTC | #1
>----------------------------------------------------------------------
>The driver should continue get the timestamp if
>STMMAC_FLAG_EXT_SNAPSHOT_EN flag is set.
>
[Suman] Hi Lai,
Please ad the "fixes" tag

>Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
>Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
diff mbox series

Patch

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) >>