diff options
| author | Lijun Ou <oulijun@huawei.com> | 2018-12-12 17:49:07 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-05 09:21:22 +0100 |
| commit | 53ac199202e3d2f9560a977877b03619f8d36a8a (patch) | |
| tree | 81a770d077fd120979662d5453c5351151c32bbd /drivers/infiniband/hw | |
| parent | c665760002cd9ebe4f8c5c0e29effd1a3787bc8f (diff) | |
| download | linux-53ac199202e3d2f9560a977877b03619f8d36a8a.tar.gz linux-53ac199202e3d2f9560a977877b03619f8d36a8a.tar.bz2 linux-53ac199202e3d2f9560a977877b03619f8d36a8a.zip | |
RDMA/hns: Bugfix for the scene without receiver queue
[ Upstream commit 4d103905eb1e4f14cb62fcf962c9d35da7005dea ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw')
| -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 54d22868ffba..af24698ff226 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -522,7 +522,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; |
