diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2017-11-04 00:20:52 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-11-13 21:25:16 +0100 |
commit | 321e329b9c0b3328e3f6bd4924b9c8c5cbf5c22d (patch) | |
tree | e6df4c17d3a3760547dea399ebbbf7530dd851d2 /drivers/infiniband/ulp/srpt/ib_srpt.c | |
parent | iw_cxgb4: remove BUG_ON() usage. (diff) | |
download | linux-321e329b9c0b3328e3f6bd4924b9c8c5cbf5c22d.tar.xz linux-321e329b9c0b3328e3f6bd4924b9c8c5cbf5c22d.zip |
IB/srpt: Post receive work requests after qp transition to INIT state
IB and iWARP specs both spell out that posting a receive work request
to a queue pair in the RESET state is an invalid operation and required
to fail. Postpone posting receive work requests until after the
transition to the INIT state.
Fixes: commit dea262094cdf ("IB/srpt: Change default behavior from using SRQ to using RC")
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 304855b9b537..98b1b80e476b 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1687,10 +1687,6 @@ retry: goto err_destroy_cq; } - if (!sdev->use_srq) - for (i = 0; i < ch->rq_size; i++) - srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]); - atomic_set(&ch->sq_wr_avail, qp_init->cap.max_send_wr); pr_debug("%s: max_cqe= %d max_sge= %d sq_size = %d cm_id= %p\n", @@ -1701,6 +1697,10 @@ retry: if (ret) goto err_destroy_qp; + if (!sdev->use_srq) + for (i = 0; i < ch->rq_size; i++) + srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]); + out: kfree(qp_init); return ret; |