RDMA/ocrdma: Fix ocrdma_query_qp() to report q_key value for UD QPs
authorMitesh Ahuja <mitesh.ahuja@emulex.com>
Wed, 3 Dec 2014 06:06:33 +0000 (11:36 +0530)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Dec 2014 02:13:09 +0000 (18:13 -0800)
Signed-off-by: Mitesh Ahuja <mitesh.ahuja@emulex.com>
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

index 4c68305ee7814685f60d51627b0d69d28907c0f3..b6201356d669780f55a70f9a9bba8f0b8f77b73c 100644 (file)
@@ -1410,6 +1410,8 @@ int ocrdma_query_qp(struct ib_qp *ibqp,
        mutex_unlock(&dev->dev_lock);
        if (status)
                goto mbx_err;
+       if (qp->qp_type == IB_QPT_UD)
+               qp_attr->qkey = params.qkey;
        qp_attr->qp_state = get_ibqp_state(IB_QPS_INIT);
        qp_attr->cur_qp_state = get_ibqp_state(IB_QPS_INIT);
        qp_attr->path_mtu =