[PATCH 1/2] IB/ehca: fix Small QP regressions



From: Stefan Roscher <stefan.roscher@xxxxxxxxxx>

The new Small QP code had a few bugs that would also trigger for non-Small
QPs. Fix them.

Signed-off-by: Joachim Fenkes <fenkes@xxxxxxxxxx>
---
drivers/infiniband/hw/ehca/ehca_qp.c | 10 ++++++----
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 b178cba..84d435a 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(

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);
}
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
index a090c67..29bd476 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)
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);
--
1.5.2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Weekly Python Patch/Bug Summary
    ... Fix pydoc crashing on unicode strings ... New / Reopened Bugs ... special methods become static ... Incorrect length of unicode strings using .encode ...
    (comp.lang.python)
  • Re: 2.6.21-rc7-mm2
    ... a number of nasty bugs were fixed. ... Fix git-agpgart.patch ... rtc: lost some interrupts at 1024Hz. ...
    (Linux-Kernel)
  • Re: Does Borland release patches for free?
    ... > If by a stamp you mean a QA stamp, rather than a postage stamp, then ... > production running I want my clients to know that I test my own code ... and it the fix made a huge speed difference, it wasnt a borland fix, ... I have very few bugs ...
    (borland.public.delphi.non-technical)
  • 2.6.21-rc7-mm2
    ... a number of nasty bugs were fixed. ... the 64-bit futex patches and the private-futex patches were ... Fix git-agpgart.patch ... IDE tree updates ...
    (Linux-Kernel)
  • Re: Office 2004 SP1 - What did it Fix??
    ... where it takes decades for bugs to ... The fact that this release doesn't fix an issue as obvious as the one ... > MS apparently really is using the Error Reporting to find bugs and to ... So do, everyone, keep sending in reports. ...
    (microsoft.public.mac.office.word)