]> 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)
commita33cba42e79b95f4f3b43939590a795523f5535b
tree084d32fc642e6c2d37c32c6a5b07c469300e0c17
parentbba9e999fc9862ee1f1d44a352ba63ab394ece38
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: bbdac2db5bc0 ("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