diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-11-01 21:08:19 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-11-01 21:08:19 +0300 |
commit | 6a463bc9d9997818a2df26c54319dc3a33c7ce38 (patch) | |
tree | 1f80500c3fc8dd17045d4342569378cb5b4c01aa /drivers/infiniband/hw/qedr | |
parent | a2a2a69d144d66e0c36697da062b3949e3c2c870 (diff) | |
parent | 4f960393a0ee9a39469ceb7c8077ae8db665cc12 (diff) | |
download | linux-6a463bc9d9997818a2df26c54319dc3a33c7ce38.tar.xz |
Merge branch 'for-rc' into rdma.git for-next
Patches held over for a possible rc8.
* for-rc:
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
RDMA/hns: Fix initial arm_st of CQ
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr')
-rw-r--r-- | drivers/infiniband/hw/qedr/verbs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 48d2f6b1a813..9100009f0a23 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2734,15 +2734,18 @@ int qedr_query_qp(struct ib_qp *ibqp, int rc = 0; memset(¶ms, 0, sizeof(params)); - - rc = dev->ops->rdma_query_qp(dev->rdma_ctx, qp->qed_qp, ¶ms); - if (rc) - goto err; - memset(qp_attr, 0, sizeof(*qp_attr)); memset(qp_init_attr, 0, sizeof(*qp_init_attr)); - qp_attr->qp_state = qedr_get_ibqp_state(params.state); + if (qp->qp_type != IB_QPT_GSI) { + rc = dev->ops->rdma_query_qp(dev->rdma_ctx, qp->qed_qp, ¶ms); + if (rc) + goto err; + qp_attr->qp_state = qedr_get_ibqp_state(params.state); + } else { + qp_attr->qp_state = qedr_get_ibqp_state(QED_ROCE_QP_STATE_RTS); + } + qp_attr->cur_qp_state = qedr_get_ibqp_state(params.state); qp_attr->path_mtu = ib_mtu_int_to_enum(params.mtu); qp_attr->path_mig_state = IB_MIG_MIGRATED; |