diff options
author | Stefan Roscher <stefan.roscher@de.ibm.com> | 2007-08-31 10:02:59 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-08-31 16:56:42 -0400 |
commit | fecea0ab3415bfab9a1964690e53b10c5d8f2e46 (patch) | |
tree | 45c8a33154fad54c00dd86d9b5b989d6b3bd04d1 /drivers | |
parent | 18115f45374d19ada218fc013aa5308baf5d283e (diff) |
IB/ehca: Fix Small QP regressions
The new Small QP code had a few bugs that would also make it trigger
for non-Small QPs. Fix them.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 10 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ipz_pt_fn.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index b178cba96345..84d435a5ee11 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp( | |||
600 | 600 | ||
601 | if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap) | 601 | if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap) |
602 | && !(context && udata)) { /* no small QP support in userspace ATM */ | 602 | && !(context && udata)) { /* no small QP support in userspace ATM */ |
603 | ehca_determine_small_queue( | 603 | if (HAS_SQ(my_qp)) |
604 | &parms.squeue, max_send_sge, is_llqp); | 604 | ehca_determine_small_queue( |
605 | ehca_determine_small_queue( | 605 | &parms.squeue, max_send_sge, is_llqp); |
606 | &parms.rqueue, max_recv_sge, is_llqp); | 606 | if (HAS_RQ(my_qp)) |
607 | ehca_determine_small_queue( | ||
608 | &parms.rqueue, max_recv_sge, is_llqp); | ||
607 | parms.qp_storage = | 609 | parms.qp_storage = |
608 | (parms.squeue.is_small || parms.rqueue.is_small); | 610 | (parms.squeue.is_small || parms.rqueue.is_small); |
609 | } | 611 | } |
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c index a090c679c397..29bd476fbd54 100644 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c | |||
@@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd) | |||
172 | unsigned long bit; | 172 | unsigned long bit; |
173 | int free_page = 0; | 173 | int free_page = 0; |
174 | 174 | ||
175 | bit = ((unsigned long)queue->queue_pages[0] & PAGE_MASK) | 175 | bit = ((unsigned long)queue->queue_pages[0] & ~PAGE_MASK) |
176 | >> (order + 9); | 176 | >> (order + 9); |
177 | 177 | ||
178 | mutex_lock(&pd->lock); | 178 | mutex_lock(&pd->lock); |