| From | Greg Kroah-Hartman <> | Subject | [PATCH 4.16 136/279] RDMA/hns: Submit bad wr | Date | Mon, 18 Jun 2018 10:12:01 +0200 |
| |
4.16-stable review patch. If anyone has any objections, please let me know.
------------------
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; } }
|