OSDN Git Service

RDMA/hns: Bugfix for posting a wqe with sge
authorLijun Ou <oulijun@huawei.com>
Thu, 9 Jan 2020 12:10:52 +0000 (20:10 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 10 Jan 2020 15:17:27 +0000 (11:17 -0400)
commit468d020e2f02867b8ec561461a1689cd4365e493
tree54478fac0f786c0470bb8a9eb4e77907e50f6b2e
parent2c9d4e26d1ab27ceae2ded2ffe930f8e5f5b2a89
RDMA/hns: Bugfix for posting a wqe with sge

Driver should first check whether the sge is valid, then fill the valid
sge and the caculated total into hardware, otherwise invalid sges will
cause an error.

Fixes: 52e3b42a2f58 ("RDMA/hns: Filter for zero length of sge in hip08 kernel mode")
Fixes: 7bdee4158b37 ("RDMA/hns: Fill sq wqe context of ud type in hip08")
Link: https://lore.kernel.org/r/1578571852-13704-1-git-send-email-liweihang@huawei.com
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c