]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix bug during CMDQ initialization
authorLang Cheng <chenglang@huawei.com>
Sat, 13 Mar 2021 02:30:11 +0000 (10:30 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 22 Mar 2021 12:25:57 +0000 (09:25 -0300)
commit61b18c43a19f227fa26e21b0fa6d05cfca81f878
tree084d32fc642e6c2d37c32c6a5b07c469300e0c17
parenta487e2f087af16e18c5f1de5790826e3c9f010c4
RDMA/hns: Fix bug during CMDQ initialization

When reloading driver, the head/tail pointer of CMDQ may be not at
position 0. Then during initialization of CMDQ, if head is reset first,
the firmware will start to handle CMDQ because the head is not equal to
the tail. The driver can reset tail first since the firmware will be
triggerred only by head. This bug is introduced by changing macros of
head/tail register without changing the order of initialization.

Fixes: 91110e0490dd ("RDMA/hns: Adjust fields and variables about CMDQ tail/head")
Link: https://lore.kernel.org/r/1615602611-7963-1-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_hw_v2.c