summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authoroulijun <oulijun@huawei.com>2018-04-26 08:46:17 +0200
committerDoug Ledford <dledford@redhat.com>2018-04-27 20:20:47 +0200
commit6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3 (patch)
treefb3c7bbea2a2782b3e4f4668dc88b4e9ea1b0feb /drivers/infiniband
parentRDMA/hns: Intercept illegal RDMA operation when use inline data (diff)
downloadlinux-6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3.tar.xz
linux-6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3.zip
RDMA/hns: Fix the qp context state diagram
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index aa5f9b3e1c10..a4eea701d19d 100644
--- 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 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 {