blob: cc6581f4063a664959aa49fdb419f7ad644083f0 [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:23 +0800
Subject: RDMA/hns: Submit bad wr
From: oulijun <oulijun@huawei.com>
[ Upstream commit 137ae3208416278aabef3b71e0ea1052940ca362 ]
When generated bad work reqeust, it needs to
report to user. This patch mainly fixes 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
@@ -153,7 +153,7 @@ static int hns_roce_v2_post_send(struct
ibqp->qp_type != IB_QPT_GSI &&
ibqp->qp_type != IB_QPT_UD)) {
dev_err(dev, "Not supported QP(0x%x)type!\n", ibqp->qp_type);
- *bad_wr = NULL;
+ *bad_wr = wr;
return -EOPNOTSUPP;
}
@@ -461,6 +461,7 @@ static int hns_roce_v2_post_send(struct
} else {
dev_err(dev, "Illegal qp_type(0x%x)\n", ibqp->qp_type);
spin_unlock_irqrestore(&qp->sq.lock, flags);
+ *bad_wr = wr;
return -EOPNOTSUPP;
}
}