From: Zhao Weibo zhaoweibo3@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
-------------------------------
After changing device state to HNS_ROCE_DEVICE_STATE_UNINIT handle device err and let usr to poll cq.
Reviewed-by: Hu Chunzhi huchunzhi@huawei.com Signed-off-by: Zhao Weibo zhaoweibo3@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 8afbe4e..41b4011 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -7330,6 +7330,7 @@ static void __hns_roce_hw_v2_uninit_instance(struct hnae3_handle *handle, handle->priv = NULL;
hr_dev->state = HNS_ROCE_DEVICE_STATE_UNINIT; + hns_roce_handle_device_err(hr_dev);
hns_roce_exit(hr_dev); kfree(hr_dev->priv); @@ -7487,7 +7488,6 @@ static int hns_roce_hw_v2_reset_notify_down(struct hnae3_handle *handle) hns_roce_v2_reset_notify_user(hr_dev);
hr_dev->state = HNS_ROCE_DEVICE_STATE_RST_DOWN; - hns_roce_handle_device_err(hr_dev);
return 0; }