mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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: e0ea34158e ("net: ena: Add PHC support in the ENA driver")
Closes: https://sashiko.dev/#/patchset/20260430032507.11586-1-akiyano%40amazon.com
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f9f25118fa
commit
954981dbbf
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user