]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/hns: Fix the qp context state diagram
authoroulijun <oulijun@huawei.com>
Thu, 26 Apr 2018 06:46:17 +0000 (14:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:01:30 +0000 (04:01 +0900)
[ Upstream commit 6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3 ]

According to RoCE protocol, it is possible to
transition from error to error state for modifying
qp in hip08. This patch fix it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 3d5141fad708078dee1918f98b97dce61f0a418c..5f12047b71afb014e4e2091db5c816a192c0d5fc 100644 (file)
@@ -3166,7 +3166,8 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
                   (cur_state == IB_QPS_RTR && new_state == IB_QPS_ERR) ||
                   (cur_state == IB_QPS_RTS && new_state == IB_QPS_ERR) ||
                   (cur_state == IB_QPS_SQD && new_state == IB_QPS_ERR) ||
-                  (cur_state == IB_QPS_SQE && new_state == IB_QPS_ERR)) {
+                  (cur_state == IB_QPS_SQE && new_state == IB_QPS_ERR) ||
+                  (cur_state == IB_QPS_ERR && new_state == IB_QPS_ERR)) {
                /* Nothing */
                ;
        } else {