Skip to content

Commit

Permalink
IB/ehca: Fix Small QP regressions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Roscher authored and Roland Dreier committed Aug 31, 2007
1 parent 18115f4 commit fecea0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions drivers/infiniband/hw/ehca/ehca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp(

if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
&& !(context && udata)) { /* no small QP support in userspace ATM */
ehca_determine_small_queue(
&parms.squeue, max_send_sge, is_llqp);
ehca_determine_small_queue(
&parms.rqueue, max_recv_sge, is_llqp);
if (HAS_SQ(my_qp))
ehca_determine_small_queue(
&parms.squeue, max_send_sge, is_llqp);
if (HAS_RQ(my_qp))
ehca_determine_small_queue(
&parms.rqueue, max_recv_sge, is_llqp);
parms.qp_storage =
(parms.squeue.is_small || parms.rqueue.is_small);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/ehca/ipz_pt_fn.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
unsigned long bit;
int free_page = 0;

bit = ((unsigned long)queue->queue_pages[0] & PAGE_MASK)
bit = ((unsigned long)queue->queue_pages[0] & ~PAGE_MASK)
>> (order + 9);

mutex_lock(&pd->lock);
Expand Down

0 comments on commit fecea0a

Please sign in to comment.