net: stmmac: fix incorrect flag check in timestamp interrupt
Subsystems (4)
PATCH 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.
Signed-off-by Song Yoong Siang <[email protected]>
Signed-off-by Lai Peter Jun Ann <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c +1 -1
@@ -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) >>
Signature · 1 line
1.9.1
Quoted 4 lines
----------------------------------------------------------------------
The driver should continue get the timestamp ifSTMMAC_FLAG_EXT_SNAPSHOT_ENflag is set.
[Suman] Hi Lai,
Please ad the "fixes" tag
Quoted 2 lines
Signed-off-by Song Yoong Siang <[email protected]>Signed-off-by Lai Peter Jun Ann <[email protected]>