summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@broadcom.com>2017-08-31 05:57:30 +0200
committerDoug Ledford <dledford@redhat.com>2017-09-22 19:57:32 +0200
commit55311d055175cada8249d39436371afe790df699 (patch)
treef33f585e2f27d67747d78d5b69be0108d38d7e33 /drivers
parentbnxt_re: Stop issuing further cmds to FW once a cmd times out (diff)
downloadlinux-55311d055175cada8249d39436371afe790df699.tar.xz
linux-55311d055175cada8249d39436371afe790df699.zip
bnxt_re: Fix compare and swap atomic operands
Driver must assign the user supplied compare/swap values in the wqe to successfully complete the atomic compare and swap operation. Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/bnxt_re/ib_verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 11bbf3e748b0..0dbdbe1616ab 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1916,6 +1916,7 @@ static int bnxt_re_build_atomic_wqe(struct ib_send_wr *wr,
switch (wr->opcode) {
case IB_WR_ATOMIC_CMP_AND_SWP:
wqe->type = BNXT_QPLIB_SWQE_TYPE_ATOMIC_CMP_AND_SWP;
+ wqe->atomic.cmp_data = atomic_wr(wr)->compare_add;
wqe->atomic.swap_data = atomic_wr(wr)->swap;
break;
case IB_WR_ATOMIC_FETCH_AND_ADD: