RDMA/hns: Stop doorbell update while qp state error
authorYixian Liu <liuyixian@huawei.com>
Sat, 22 Feb 2020 10:25:58 +0000 (18:25 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 28 Feb 2020 15:28:31 +0000 (11:28 -0400)
commit75c994e6943c2aa887871eb6e6cea6c073b1cfd3
tree9b6d2f0aedb276868cc17d4d2a022665148dc3d4
parent0fc99566f6eeb8c1d7e1795710b95c03a987124d
RDMA/hns: Stop doorbell update while qp state error

There are two paths to update qp producer index into hardware now, one
path is doorbell in post verbs (send and recv), the another is mailbox in
modify qp verb which is called by flush process. This will lead the
hardware to be broken to correctly generate flush cqe.  With stopping
doorbell update and holding qp spinlock in modify qp during flush process,
the problem can be solved.

Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space")
Link: https://lore.kernel.org/r/1582367158-27030-3-git-send-email-liuyixian@huawei.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c