summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authoroulijun <oulijun@huawei.com>2018-05-04 05:57:09 +0300
committerDoug Ledford <dledford@redhat.com>2018-05-09 17:45:18 +0300
commit778cc5a8b75eee62d330059a2655b515cda43278 (patch)
tree7c3937d8ac0ccd701adc41f7c1947bce2c6d3e0b /drivers/infiniband
parent391bd5fc7de54a5cb866e8897d60ee1d76b8840a (diff)
downloadlinux-778cc5a8b75eee62d330059a2655b515cda43278.tar.xz
RDMA/hns: Fix the bug with rq sge
When received multiply rq sge, it should tag the invalid lkey for the last non-zero length sge when have some sges' length are zero. This patch fixes it. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 539b0caacb9f..a40978bbc1d0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -547,8 +547,8 @@ static int hns_roce_v2_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
}
if (i < hr_qp->rq.max_gs) {
- dseg[i].lkey = cpu_to_le32(HNS_ROCE_INVALID_LKEY);
- dseg[i].addr = 0;
+ dseg->lkey = cpu_to_le32(HNS_ROCE_INVALID_LKEY);
+ dseg->addr = 0;
}
/* rq support inline data */