Skip to contentSkip to conversation

ibmvnic: substitute mb() with dma_wmb() for send_*crq* functions

PATCH Applied Lijun Pan 2 participants 2 messages Feb 13, 2021 – Feb 15, 2021

Subsystems (4)
lore
Share & tools
lore

Lijun Pan

author
#0 lore raw

PATCH 1/1 ibmvnic: substitute mb() with dma_wmb() for send_*crq* functions

The CRQ and subCRQ descriptors are DMA mapped, so dma_wmb(), though weaker, is good enough to protect the data structures.

---
 drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +2 -2
index 7a5e589e7223..927d5f36d308 100644
@@ -3599,7 +3599,7 @@ static int send_subcrq_indirect(struct ibmvnic_adapter *adapter,
 	int rc;
 
 	/* Make sure the hypervisor sees the complete request */
-	mb();
+	dma_wmb();
 	rc = plpar_hcall_norets(H_SEND_SUB_CRQ_INDIRECT, ua,
 				cpu_to_be64(remote_handle),
 				ioba, num_entries);
@@ -3629,7 +3629,7 @@ static int ibmvnic_send_crq(struct ibmvnic_adapter *adapter,
 	}
 
 	/* Make sure the hypervisor sees the complete request */
-	mb();
+	dma_wmb();
 
 	rc = plpar_hcall_norets(H_SEND_CRQ, ua,
 				cpu_to_be64(u64_crq[0]),
Signature · 1 line
2.23.0
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Fri, 12 Feb 2021 20:36:46 -0600 you wrote:

The CRQ and subCRQ descriptors are DMA mapped, so dma_wmb(), though weaker, is good enough to protect the data structures.

---
 drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [net-next] ibmvnic: substitute mb() with dma_wmb() for send_*crq* functions

    https://git.kernel.org/netdev/net-next/c/1a42156f52bd

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html