summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_qp.c
diff options
context:
space:
mode:
authorYixian Liu <liuyixian@huawei.com>2020-02-22 18:25:57 +0800
committerJason Gunthorpe <jgg@mellanox.com>2020-02-28 11:28:31 -0400
commit0fc99566f6eeb8c1d7e1795710b95c03a987124d (patch)
tree9857c0b7a1db1bad1a4c3ad95ba60f1438bec32c /drivers/infiniband/hw/hns/hns_roce_qp.c
parentdfaf2854b02e5c45bf806c7a1d8b4706b87ddc8e (diff)
downloadlinux-0fc99566f6eeb8c1d7e1795710b95c03a987124d.tar.gz
linux-0fc99566f6eeb8c1d7e1795710b95c03a987124d.tar.bz2
linux-0fc99566f6eeb8c1d7e1795710b95c03a987124d.zip
RDMA/hns: Use flush framework for the case in aeq
As now we already have flush framework, using it instead of current flush process for qp error in asynchronized interrupt (aeq). Link: https://lore.kernel.org/r/1582367158-27030-2-git-send-email-liuyixian@huawei.com Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_qp.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_qp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index c52e1b00f30d..6c3f0f737963 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -98,6 +98,15 @@ void hns_roce_qp_event(struct hns_roce_dev *hr_dev, u32 qpn, int event_type)
return;
}
+ if (hr_dev->hw_rev != HNS_ROCE_HW_VER1 &&
+ (event_type == HNS_ROCE_EVENT_TYPE_WQ_CATAS_ERROR ||
+ event_type == HNS_ROCE_EVENT_TYPE_INV_REQ_LOCAL_WQ_ERROR ||
+ event_type == HNS_ROCE_EVENT_TYPE_LOCAL_WQ_ACCESS_ERROR)) {
+ qp->state = IB_QPS_ERR;
+ if (!test_and_set_bit(HNS_ROCE_FLUSH_FLAG, &qp->flush_flag))
+ init_flush_work(hr_dev, qp);
+ }
+
qp->event(qp, (enum hns_roce_event)event_type);
if (atomic_dec_and_test(&qp->refcount))