]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:43 +0000 (15:37 -0500)
commitdbaafbef83d0f5c508e6d2ba426dc0787cde1d31
treeab3ba1e181fb31e281c63e4de75ddb6eaa1bef34
parente791743714a3b46da28846b1337db2ddb0093e01
net: ionic: add dma_wmb() before ringing TX doorbell

[ Upstream commit d261f5b09c28850dc63ca1d3018596f829f402d5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c