summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroulijun <oulijun@huawei.com>2018-01-10 14:39:47 +0800
committerJason Gunthorpe <jgg@mellanox.com>2018-01-16 20:38:18 -0700
commit6d13b869ea1e929842e9d758867e4b7473759f9d (patch)
tree8c3e4cc6bf783e917922166004822497f50bcbdc
parent979a459c8347a797fd03717a3f12289c91617982 (diff)
downloadlinux-6d13b869ea1e929842e9d758867e4b7473759f9d.tar.bz2
RDMA/hns: Assign the correct value for tx_cqn
When modifying qp from init to init, it need to assign the cqn of send cq for tx cqn field of qp context. Otherwise, it will cause a mistake when the send and recv cq sizes are different. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 34f13c3cb088..faf91eea9cf0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -2342,7 +2342,7 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp,
V2_QPC_BYTE_80_RX_CQN_S, 0);
roce_set_field(context->byte_252_err_txcqn, V2_QPC_BYTE_252_TX_CQN_M,
- V2_QPC_BYTE_252_TX_CQN_S, to_hr_cq(ibqp->recv_cq)->cqn);
+ V2_QPC_BYTE_252_TX_CQN_S, to_hr_cq(ibqp->send_cq)->cqn);
roce_set_field(qpc_mask->byte_252_err_txcqn, V2_QPC_BYTE_252_TX_CQN_M,
V2_QPC_BYTE_252_TX_CQN_S, 0);