]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
IB/hns: Modify query info named port_num when querying RC QP
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Wed, 23 Nov 2016 19:41:06 +0000 (19:41 +0000)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 19:20:42 +0000 (14:20 -0500)
This patch modified the output query info qp_attr->port_num
to fix bug in hip06.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c

index f7e0fdf33bb14c0ce2951c38c9f17655253469cf..cc64230d44c0c8d2223fa02fab1d7a9f74de4cc1 100644 (file)
@@ -2857,9 +2857,7 @@ static int hns_roce_v1_q_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
        qp_attr->pkey_index = roce_get_field(context->qpc_bytes_12,
                              QP_CONTEXT_QPC_BYTES_12_P_KEY_INDEX_M,
                              QP_CONTEXT_QPC_BYTES_12_P_KEY_INDEX_S);
-       qp_attr->port_num = (u8)roce_get_field(context->qpc_bytes_156,
-                            QP_CONTEXT_QPC_BYTES_156_PORT_NUM_M,
-                            QP_CONTEXT_QPC_BYTES_156_PORT_NUM_S) + 1;
+       qp_attr->port_num = hr_qp->port + 1;
        qp_attr->sq_draining = 0;
        qp_attr->max_rd_atomic = roce_get_field(context->qpc_bytes_156,
                                 QP_CONTEXT_QPC_BYTES_156_INITIATOR_DEPTH_M,