diff options
author | Lijun Ou <oulijun@huawei.com> | 2018-12-12 17:49:07 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-07 12:12:50 -0700 |
commit | 4d103905eb1e4f14cb62fcf962c9d35da7005dea (patch) | |
tree | 4ce827f2049dbbcbc3c1d9fa12e8fa5bb59e6e46 /drivers | |
parent | 9c6ccc035c209dda07685e8dba829a203ba17499 (diff) |
RDMA/hns: Bugfix for the scene without receiver queue
In some application scenario, the user could not have receive queue when
run rdma write or read operation.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_qp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 54031c5b53fa..b9ba140b50d4 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -526,7 +526,8 @@ static int hns_roce_qp_has_sq(struct ib_qp_init_attr *attr) static int hns_roce_qp_has_rq(struct ib_qp_init_attr *attr) { if (attr->qp_type == IB_QPT_XRC_INI || - attr->qp_type == IB_QPT_XRC_TGT || attr->srq) + attr->qp_type == IB_QPT_XRC_TGT || attr->srq || + !attr->cap.max_recv_wr) return 0; return 1; |