]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ena] Add memory barrier after writing to on-device memory
authorMichael Brown <mcb30@ipxe.org>
Fri, 17 Oct 2025 11:34:03 +0000 (12:34 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 17 Oct 2025 11:35:23 +0000 (12:35 +0100)
Ensure that writes to on-device memory have taken place before writing
to the doorbell register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ena.c

index b90a57c07b98040602b8341072af8f413eec4fc9..5dd0ef23e4c355e50c143821896ec5cec07d00a8 100644 (file)
@@ -1125,6 +1125,7 @@ static int ena_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
                dest = ( ena->tx.sq.llqe + ( index * sizeof ( *llqe ) ) );
                for ( i = 0 ; i < ( sizeof ( *llqe ) / sizeof ( *src ) ); i++ )
                        writeq ( *(src++), dest++ );
+               wmb();
        }
 
        /* Increment producer counter */