Blob Blame History Raw
From: Lijun Ou <oulijun@huawei.com>
Date: Sun, 30 Sep 2018 17:00:29 +0800
Subject: RDMA/hns: Submit bad wr when post send wr exception
Patch-mainline: v4.20-rc1
Git-commit: c80e066100b5fed722c8da67c1bd2312e7bcf129
References: bsc#1104427 FATE#326416

When user issues a RDMA read and enables sq inline, it needs to report a
bad wr to user.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -133,6 +133,7 @@ static int set_rwqe_data_seg(struct ib_q
 		}
 
 		if (wr->opcode == IB_WR_RDMA_READ) {
+			*bad_wr =  wr;
 			dev_err(hr_dev->dev, "Not support inline data!\n");
 			return -EINVAL;
 		}