blob: 2f619a0defc109d2fbc3c1d2d421c5b612275c72 [file] [log] [blame]
From foo@baz Sun Jun 17 12:07:34 CEST 2018
From: oulijun <oulijun@huawei.com>
Date: Thu, 26 Apr 2018 14:46:17 +0800
Subject: RDMA/hns: Fix the qp context state diagram
From: oulijun <oulijun@huawei.com>
[ 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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3166,7 +3166,8 @@ static int hns_roce_v2_modify_qp(struct
(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 {