net: ena: PHC: Add missing barrier
Subsystems (3)
Arthur Kiyanovski
maintainerPATCH v2 1/1 net: ena: PHC: Add missing barrier
Add dma_rmb() barrier after req_id completion check in ena_com_phc_get_timestamp(). On weakly-ordered architectures, payload fields may be read before req_id is observed as updated.
Fixes e0ea34158ee8 ("net: ena: Add PHC support in the ENA driver")
Signed-off-by Arthur Kiyanovski <[email protected]>
--- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/amazon/ena/ena_com.c +5 -0
@@ -1880,6 +1880,11 @@ int ena_com_phc_get_timestamp(struct ena_com_dev *ena_dev, u64 *timestamp)continue ; } +/* Ensure PHC payload (timestamp, error_flags) is read +* after req_id update is observed +*/ +dma_rmb (); +/* req_id was updated by the device which indicates that * PHC timestamp and error_flags are updated too, * checking errors before retrieving timestamp
Signature · 1 line
2.47.3
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 4 Jun 2026 08:07:04 +0000 you wrote:
Add
dma_rmb()barrier afterreq_idcompletion check inena_com_phc_get_timestamp(). On weakly-ordered architectures, payload fields may be read beforereq_idis observed as updated.Fixes e0ea34158ee8 ("net: ena: Add PHC support in the ENA driver")Signed-off-by Arthur Kiyanovski <[email protected]>[...]
Here is the summary with links:
- [v2,net] net: ena: PHC: Add missing barrier
https://git.kernel.org/netdev/net/c/954981dbbfbd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html