diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2007-07-09 09:25:10 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:27 -0400 |
commit | a6a12947fbf4a1782535468d756b0d44babf9760 (patch) | |
tree | 4819ad9abd03f92e51c076745e7068028d06b105 /drivers/infiniband/hw/ehca/ehca_uverbs.c | |
parent | 9a79fc0a1b815cbd05a8e37ea838acfccb7235cc (diff) |
IB/ehca: add Shared Receive Queue support
Support SRQs on eHCA2. Since an SRQ is a QP for eHCA2, a lot of code
(structures, create, destroy, post_recv) can be shared between QP and SRQ.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_uverbs.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_uverbs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c index 73db920b6945..d8fe37d56f1a 100644 --- a/drivers/infiniband/hw/ehca/ehca_uverbs.c +++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c | |||
@@ -257,6 +257,7 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) | |||
257 | struct ehca_cq *cq; | 257 | struct ehca_cq *cq; |
258 | struct ehca_qp *qp; | 258 | struct ehca_qp *qp; |
259 | struct ehca_pd *pd; | 259 | struct ehca_pd *pd; |
260 | struct ib_uobject *uobject; | ||
260 | 261 | ||
261 | switch (q_type) { | 262 | switch (q_type) { |
262 | case 1: /* CQ */ | 263 | case 1: /* CQ */ |
@@ -304,7 +305,8 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) | |||
304 | return -ENOMEM; | 305 | return -ENOMEM; |
305 | } | 306 | } |
306 | 307 | ||
307 | if (!qp->ib_qp.uobject || qp->ib_qp.uobject->context != context) | 308 | uobject = IS_SRQ(qp) ? qp->ib_srq.uobject : qp->ib_qp.uobject; |
309 | if (!uobject || uobject->context != context) | ||
308 | return -EINVAL; | 310 | return -EINVAL; |
309 | 311 | ||
310 | ret = ehca_mmap_qp(vma, qp, rsrc_type); | 312 | ret = ehca_mmap_qp(vma, qp, rsrc_type); |