OSDN Git Service

RDMA/i40iw: Set queue pair state when being queried
authorLiu, Changcheng <changcheng.liu@intel.com>
Fri, 28 Jun 2019 06:16:13 +0000 (14:16 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 3 Jul 2019 17:45:56 +0000 (14:45 -0300)
The API for ib_query_qp requires the driver to set qp_state and
cur_qp_state on return, add the missing sets.

Fixes: d37498417947 ("i40iw: add files for iwarp interface")
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c

index 3c0c6aa..d169a80 100644 (file)
@@ -772,6 +772,8 @@ static int i40iw_query_qp(struct ib_qp *ibqp,
        struct i40iw_qp *iwqp = to_iwqp(ibqp);
        struct i40iw_sc_qp *qp = &iwqp->sc_qp;
 
+       attr->qp_state = iwqp->ibqp_state;
+       attr->cur_qp_state = attr->qp_state;
        attr->qp_access_flags = 0;
        attr->cap.max_send_wr = qp->qp_uk.sq_size;
        attr->cap.max_recv_wr = qp->qp_uk.rq_size;