From: Mitesh Ahuja Date: Wed, 3 Dec 2014 06:06:33 +0000 (+0530) Subject: RDMA/ocrdma: Fix ocrdma_query_qp() to report q_key value for UD QPs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=95bf0093a95f864044d7782ddd15528350f915be;p=linux-beck.git RDMA/ocrdma: Fix ocrdma_query_qp() to report q_key value for UD QPs Signed-off-by: Mitesh Ahuja Signed-off-by: Devesh Sharma Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 4c68305ee781..b6201356d669 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -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 =