From 11f4300d1d59d70353b780eb4f2707f0842f9e58 Mon Sep 17 00:00:00 2001 From: Weihang Li Date: Sat, 8 Jan 2022 18:52:23 +0800 Subject: [PATCH] RDMA/hns: Remove RST2RST error prints for hw v1 mainline inclusion from mainline-v5.15-rc1 commit ab5cbb9d287c category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4O23M CVE: NA --------------------------------------------------------------------- There is no need to prints error for hw_v1. Link: https://lore.kernel.org/r/1629985056-57004-5-git-send-email-liangwenpeng@huawei.com Signed-off-by: Weihang Li Signed-off-by: Wenpeng Liang Signed-off-by: Jason Gunthorpe sigend-off-by: Guofeng Yue Reviewed-by: Yangyang Li Acked-by: Xie XiuQi Signed-off-by: Zheng Zengkai --- drivers/infiniband/hw/hns/hns_roce_qp.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index cf857eab1f2a..12571799c438 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -1406,17 +1406,8 @@ int hns_roce_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, if (ret) goto out; - if (cur_state == new_state && cur_state == IB_QPS_RESET) { - if (hr_dev->hw_rev == HNS_ROCE_HW_VER1) { - ret = -EPERM; - ibdev_err(&hr_dev->ib_dev, - "RST2RST state is not supported\n"); - } else { - ret = 0; - } - + if (cur_state == new_state && cur_state == IB_QPS_RESET) goto out; - } ret = hr_dev->hw->modify_qp(ibqp, attr, attr_mask, cur_state, new_state); -- GitLab