diff options
author | Osama Abboud <osamaabb@amazon.com> | 2024-08-07 06:24:16 +0000 |
---|---|---|
committer | Osama Abboud <osamaabb@FreeBSD.org> | 2024-10-15 16:54:28 +0000 |
commit | 259e904afa237b6b7d3fb5007ef03ea778f68fbd (patch) | |
tree | 7bb5dc924bd12f4c5a93b38aa2ead2f7ff63b774 | |
parent | 0486b8582beda02de680d3c8e604a0ddd86bc638 (diff) |
ena: Fix memory barrier comment
The dma_rmb() memory barrier guarantees that the device set the
phase bit before continuing to read the rest of the descriptor.
Because the phase bit and the rest of the descriptor are in the same
cache line this ensures coherency of the data from the descriptor.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
-rw-r--r-- | ena_com.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ena_com.c b/ena_com.c index 8c065e700726..198302965318 100644 --- a/ena_com.c +++ b/ena_com.c @@ -2448,8 +2448,8 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *ena_dev, void *data) /* Go over all the events */ while ((READ_ONCE8(aenq_common->flags) & ENA_ADMIN_AENQ_COMMON_DESC_PHASE_MASK) == phase) { - /* Make sure the phase bit (ownership) is as expected before - * reading the rest of the descriptor. + /* Make sure the device finished writing the rest of the descriptor + * before reading it. */ dma_rmb(); |