diff mbox series

[RFC,net] net: stmmac: Fix hardware TX timestamping on queue with tc-etf enabled

Message ID 20210310151033.630349-1-vladimir.oltean@nxp.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series [RFC,net] net: stmmac: Fix hardware TX timestamping on queue with tc-etf enabled | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers warning 3 maintainers not CCed: mcoquelin.stm32@gmail.com linux-arm-kernel@lists.infradead.org linux-stm32@st-md-mailman.stormreply.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch warning WARNING: From:/Signed-off-by: email address mismatch: 'From: Vladimir Oltean <olteanv@gmail.com>' != 'Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>'
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Vladimir Oltean March 10, 2021, 3:10 p.m. UTC
After commit 29d98f54a4fe ("net: enetc: allow hardware timestamping on
TX queues with tc-etf enabled"), I went through the other drivers that
offload tc-etf, and I believe I found a similar bug in stmmac.

Fixes: 579a25a854d4 ("net: stmmac: Initial support for TBS")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 208cae344ffa..1393898a7d6d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3636,6 +3636,7 @@  static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
 
 		tbs_desc = &tx_q->dma_entx[first_entry];
 		stmmac_set_desc_tbs(priv, tbs_desc, ts.tv_sec, ts.tv_nsec);
+		skb->tstamp = ktime_set(0, 0);
 	}
 
 	stmmac_set_tx_owner(priv, first);