]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitaf06b628a6bde8506bbad32dbf7cc641c0176ad7
tree084d32fc642e6c2d37c32c6a5b07c469300e0c17
parent22053df0a3647560e6aa11cb6ddcb0da04f505cc
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: 292b3352bd5b ("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