RDMA/hns: Refactor reset state checking flow
authorXi Wang <wangxi11@huawei.com>
Sat, 27 Mar 2021 03:21:32 +0000 (11:21 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Apr 2021 19:12:45 +0000 (16:12 -0300)
commitee82e68850a43a080e64497ec6940d23f8c6df66
tree7cff2362b86a984e268862689f96dda7cb1a28fb
parentd102a6e3748474074d0610bc144979a20e328c3e
RDMA/hns: Refactor reset state checking flow

The 'HNS_ROCE_OPC_QUERY_MB_ST' command will response the mailbox complete
status and hardware busy flag, and the complete status is only valid when
the busy flag is 0, so it's better to query these two fields at a time
rather than separately.

Link: https://lore.kernel.org/r/1616815294-13434-4-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_cmd.c
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h