]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ionic: add dma_wmb() before ringing TX doorbell
authorMohammad Heib <mheib@redhat.com>
Fri, 31 Oct 2025 15:52:02 +0000 (17:52 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 01:19:21 +0000 (17:19 -0800)
commitd261f5b09c28850dc63ca1d3018596f829f402d5
tree7c1a6dcc5a4179f0b32225ab5a39e3c518569343
parent7172c8cd65a09915a8bc4b8dc3f8719f0ca20e71
net: ionic: add dma_wmb() before ringing TX doorbell

The TX path currently writes descriptors and then immediately writes to
the MMIO doorbell register to notify the NIC.  On weakly ordered
architectures, descriptor writes may still be pending in CPU or DMA
write buffers when the doorbell is issued, leading to the device
fetching stale or incomplete descriptors.

Add a dma_wmb() in ionic_txq_post() to ensure all descriptor writes are
visible to the device before the doorbell MMIO write.

Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
Signed-off-by: Mohammad Heib <mheib@redhat.com>
Link: https://patch.msgid.link/20251031155203.203031-1-mheib@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c