* [PATCH net-next] net: stmmac: Fix E2E delay mechanism
@ 2025-11-25 14:50 Rohan G Thomas via B4 Relay
2025-11-25 16:26 ` Andrew Lunn
2025-11-25 23:19 ` Russell King (Oracle)
0 siblings, 2 replies; 5+ messages in thread
From: Rohan G Thomas via B4 Relay @ 2025-11-25 14:50 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
Jose Abreu, Fugang Duan, Kurt Kanzenbach
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Rohan G Thomas
From: Rohan G Thomas <rohan.g.thomas@altera.com>
For E2E delay mechanism, "received DELAY_REQ without timestamp" error
messages shows up for dwmac v3.70+ and dwxgmac IPs.
This issue affects socfpga platforms, Agilex7 (dwmac 3.70) and
Agilex5 (dwxgmac). According to the databook, to enable timestamping
for all events, the SNAPTYPSEL bit in the MAC_Timestamp_Control
register must be set to 2'b00, and the TSEVNTENA bit must be cleared
to 0'b0.
Commit 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism") already
addresses this problem for all dwmacs above version v4.10. However,
same holds true for v3.70 and above, as well as for dwxgmac. Updates
the check accordingly.
Fixes: 14f347334bf2 ("net: stmmac: Correctly take timestamp for PTPv2")
Fixes: f2fb6b6275eb ("net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a")
Fixes: 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism")
Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 6cacedb2c9b3fefdd4c9ec8ba98d389443d21ebd..2885434cb0bea7166dca2a914a6c07e21c98e5b9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -665,7 +665,8 @@ static int stmmac_hwtstamp_set(struct net_device *dev,
config->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
ptp_v2 = PTP_TCR_TSVER2ENA;
snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
- if (priv->synopsys_id < DWMAC_CORE_4_10)
+ if (priv->synopsys_id < DWMAC_CORE_3_70 &&
+ priv->plat->core_type != DWMAC_CORE_XGMAC)
ts_event_en = PTP_TCR_TSEVNTENA;
ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA;
ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA;
---
base-commit: e3daf0e7fe9758613bec324fd606ed9caa187f74
change-id: 20251125-ext-ptp-fix-c7be5ccc9581
Best regards,
--
Rohan G Thomas <rohan.g.thomas@altera.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix E2E delay mechanism
2025-11-25 14:50 [PATCH net-next] net: stmmac: Fix E2E delay mechanism Rohan G Thomas via B4 Relay
@ 2025-11-25 16:26 ` Andrew Lunn
2025-11-26 4:24 ` G Thomas, Rohan
2025-11-25 23:19 ` Russell King (Oracle)
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2025-11-25 16:26 UTC (permalink / raw)
To: rohan.g.thomas
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
Jose Abreu, Fugang Duan, Kurt Kanzenbach, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
On Tue, Nov 25, 2025 at 10:50:02PM +0800, Rohan G Thomas via B4 Relay wrote:
> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>
> For E2E delay mechanism, "received DELAY_REQ without timestamp" error
> messages shows up for dwmac v3.70+ and dwxgmac IPs.
>
> This issue affects socfpga platforms, Agilex7 (dwmac 3.70) and
> Agilex5 (dwxgmac). According to the databook, to enable timestamping
> for all events, the SNAPTYPSEL bit in the MAC_Timestamp_Control
> register must be set to 2'b00, and the TSEVNTENA bit must be cleared
> to 0'b0.
>
> Commit 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism") already
> addresses this problem for all dwmacs above version v4.10. However,
> same holds true for v3.70 and above, as well as for dwxgmac. Updates
> the check accordingly.
>
> Fixes: 14f347334bf2 ("net: stmmac: Correctly take timestamp for PTPv2")
> Fixes: f2fb6b6275eb ("net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a")
> Fixes: 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism")
Given the list of Fixes: do you want this back ported to stable? If
so, you should not submit it for net-next.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix E2E delay mechanism
2025-11-25 14:50 [PATCH net-next] net: stmmac: Fix E2E delay mechanism Rohan G Thomas via B4 Relay
2025-11-25 16:26 ` Andrew Lunn
@ 2025-11-25 23:19 ` Russell King (Oracle)
2025-11-26 6:01 ` G Thomas, Rohan
1 sibling, 1 reply; 5+ messages in thread
From: Russell King (Oracle) @ 2025-11-25 23:19 UTC (permalink / raw)
To: rohan.g.thomas
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
Jose Abreu, Fugang Duan, Kurt Kanzenbach, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
On Tue, Nov 25, 2025 at 10:50:02PM +0800, Rohan G Thomas via B4 Relay wrote:
> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>
> For E2E delay mechanism, "received DELAY_REQ without timestamp" error
> messages shows up for dwmac v3.70+ and dwxgmac IPs.
>
> This issue affects socfpga platforms, Agilex7 (dwmac 3.70) and
> Agilex5 (dwxgmac). According to the databook, to enable timestamping
> for all events, the SNAPTYPSEL bit in the MAC_Timestamp_Control
bits
> register must be set to 2'b00, and the TSEVNTENA bit must be cleared
> to 0'b0.
Are you sure 3.70 is the appropriate point. According to the 3.74
databook, SNAPTYPSEL changed between 3.5 and 3.6.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix E2E delay mechanism
2025-11-25 16:26 ` Andrew Lunn
@ 2025-11-26 4:24 ` G Thomas, Rohan
0 siblings, 0 replies; 5+ messages in thread
From: G Thomas, Rohan @ 2025-11-26 4:24 UTC (permalink / raw)
To: Andrew Lunn
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
Jose Abreu, Fugang Duan, Kurt Kanzenbach, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
Hi Andrew,
On 11/25/2025 9:56 PM, Andrew Lunn wrote:
> On Tue, Nov 25, 2025 at 10:50:02PM +0800, Rohan G Thomas via B4 Relay wrote:
>> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>>
>> For E2E delay mechanism, "received DELAY_REQ without timestamp" error
>> messages shows up for dwmac v3.70+ and dwxgmac IPs.
>>
>> This issue affects socfpga platforms, Agilex7 (dwmac 3.70) and
>> Agilex5 (dwxgmac). According to the databook, to enable timestamping
>> for all events, the SNAPTYPSEL bit in the MAC_Timestamp_Control
>> register must be set to 2'b00, and the TSEVNTENA bit must be cleared
>> to 0'b0.
>>
>> Commit 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism") already
>> addresses this problem for all dwmacs above version v4.10. However,
>> same holds true for v3.70 and above, as well as for dwxgmac. Updates
>> the check accordingly.
>>
>> Fixes: 14f347334bf2 ("net: stmmac: Correctly take timestamp for PTPv2")
>> Fixes: f2fb6b6275eb ("net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a")
>> Fixes: 3cb958027cb8 ("net: stmmac: Fix E2E delay mechanism")
>
> Given the list of Fixes: do you want this back ported to stable? If
> so, you should not submit it for net-next.
>
> Andrew
Thanks! Sure, I will send the next version to net instead of net-next.
Best Regards,
Rohan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix E2E delay mechanism
2025-11-25 23:19 ` Russell King (Oracle)
@ 2025-11-26 6:01 ` G Thomas, Rohan
0 siblings, 0 replies; 5+ messages in thread
From: G Thomas, Rohan @ 2025-11-26 6:01 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
Jose Abreu, Fugang Duan, Kurt Kanzenbach, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
Hi Russell,
Thanks for reviewing the patch.
On 11/26/2025 4:49 AM, Russell King (Oracle) wrote:
> On Tue, Nov 25, 2025 at 10:50:02PM +0800, Rohan G Thomas via B4 Relay wrote:
>> From: Rohan G Thomas <rohan.g.thomas@altera.com>
>>
>> For E2E delay mechanism, "received DELAY_REQ without timestamp" error
>> messages shows up for dwmac v3.70+ and dwxgmac IPs.
>>
>> This issue affects socfpga platforms, Agilex7 (dwmac 3.70) and
>> Agilex5 (dwxgmac). According to the databook, to enable timestamping
>> for all events, the SNAPTYPSEL bit in the MAC_Timestamp_Control
>
> bits
Sure, will fix this in the next version.
>
>> register must be set to 2'b00, and the TSEVNTENA bit must be cleared
>> to 0'b0.
>
> Are you sure 3.70 is the appropriate point. According to the 3.74
> databook, SNAPTYPSEL changed between 3.5 and 3.6.
>
I’m not entirely sure. As per the dwmac databook notes that SNAPTYPSEL
is not backward compatible with functions described in release 3.50a,
but it’s unclear if this specifically relates to TSEVNTENA. My
understanding is that at least from 3.70a, TSEVNTENA must be cleared to
enable time stamping for all the events.
Best Regards,
Rohan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-26 6:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 14:50 [PATCH net-next] net: stmmac: Fix E2E delay mechanism Rohan G Thomas via B4 Relay
2025-11-25 16:26 ` Andrew Lunn
2025-11-26 4:24 ` G Thomas, Rohan
2025-11-25 23:19 ` Russell King (Oracle)
2025-11-26 6:01 ` G Thomas, Rohan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).