RDMA/hns: Adjust fields and variables about CMDQ tail/head
authorLang Cheng <chenglang@huawei.com>
Sun, 7 Feb 2021 08:55:42 +0000 (16:55 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 16 Feb 2021 18:42:58 +0000 (14:42 -0400)
commit292b3352bd5bd0abeba3e8e7b5ae5acb8f7df4e0
tree3b72ac35a5528943f156c6500add7c3e577a67a6
parent563aeb226630610707980e8abe20af1e6f410ce4
RDMA/hns: Adjust fields and variables about CMDQ tail/head

The register 0x07014 is actually the head pointer of CMDQ, and 0x07010
means tail pointer. Current definitions are confusing, so rename them and
related variables.

The next_to_use of structure hns_roce_v2_cmq_ring has the same semantics
as head, merge them into one member. The next_to_clean of structure
hns_roce_v2_cmq_ring has the same semantics as tail. After deleting
next_to_clean, tail should also be deleted.

Link: https://lore.kernel.org/r/1612688143-28226-5-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_common.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h