summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijun Pan <ljp@linux.ibm.com>2021-02-12 20:36:46 -0600
committerDavid S. Miller <davem@davemloft.net>2021-02-15 15:11:04 -0800
commit1a42156f52bd4de0e2442671bc24b7ffc7b01c52 (patch)
tree974baadc392b1494ef1a003ec2b946e8699dc274
parent1c7d45e7b2c29080bf6c8cd0e213cc3cbb62a054 (diff)
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. Signed-off-by: Lijun Pan <ljp@linux.ibm.com> Acked-by: Thomas Falcon <tlfalcon@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 7a5e589e7223..927d5f36d308 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -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]),