Skip to contentSkip to conversation

RDMA/bnxt_re: Set queue pair state when being queried

PATCH Applied Kamal Heib 3 participants 3 messages Oct 21, 2020 – Oct 26, 2020

Subsystems (2)
lore
Share & tools
lore

Kamal Heib

author
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Set queue pair state when being queried

The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set.

Fixes 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -0
index cf3db9628397..f9c999d5ba28 100644
@@ -2078,6 +2078,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
 		goto out;
 	}
 	qp_attr->qp_state = __to_ib_qp_state(qplib_qp->state);
+	qp_attr->cur_qp_state = __to_ib_qp_state(qplib_qp->cur_qp_state);
 	qp_attr->en_sqd_async_notify = qplib_qp->en_sqd_async_notify ? 1 : 0;
 	qp_attr->qp_access_flags = __to_ib_access_flags(qplib_qp->access);
 	qp_attr->pkey_index = qplib_qp->pkey_index;
Signature · 1 line
2.26.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Kamal Heib

The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set.

Fixes 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

Thanks

Quoted 19 lines
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -1
index cf3db9628397..f9c999d5ba28 100644
@@ -2078,6 +2078,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
                goto out;
        }
        qp_attr->qp_state = __to_ib_qp_state(qplib_qp->state);
+       qp_attr->cur_qp_state = __to_ib_qp_state(qplib_qp->cur_qp_state);
        qp_attr->en_sqd_async_notify = qplib_qp->en_sqd_async_notify ? 1 : 0;
        qp_attr->qp_access_flags = __to_ib_access_flags(qplib_qp->access);
        qp_attr->pkey_index = qplib_qp->pkey_index;
--

2.26.2

maintainer Applied
#2 lore raw
In reply to Kamal Heib
Quoted 9 lines · Kamal Heib

The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set.

Fixes 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 +
 1 file changed, 1 insertion(+)

Can't see why this would be for -rc since it has been broken forever

Applied to for-next, thanks

Jason