Commit 4234319d authored by Shunfeng Yang's avatar Shunfeng Yang Committed by Yang Yingliang
Browse files

RDMA/hns: Fix bug during CMDQ initialization



mainline inclusion
from mainline-v5.13
commit af06b628
category: bugfix
bugzilla: NA
CVE: NA

When re-insmod hns-roce-hw-v2.ko and init CMDQ, we need to reinit PI and CI of CMDQ.
But, after last rmmod hns-roce-hw-v2.ko, the CMDQ is NOT reset, firmware still is waiting software to send cmd..
So,  if we re-init PI first, the firmware would thought that the software sent new cmds. then it start to process CMDQ.
It may be a long time for driver. If driver start to init hardware and really send cmds, the status of PI and CI are unexpected.

Signed-off-by: default avatarShunfeng Yang <yangshunfeng2@huawei.com>
Signed-off-by: default avatarYangyang Li <liyangyang20@huawei.com>
Reviewed-by: default avatarchunzhi hu <huchunzhi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 13a82e56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment