2007-08-08 18:40:01

by Stefan Roscher

[permalink] [raw]
Subject: [PATCH 2/7] IB/ehca: Ensure non-existing queues aren't made small queues

Signed-off-by: Stefan Roscher <[email protected]>
---
drivers/infiniband/hw/ehca/ehca_qp.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index cfa83fa..13b61c3 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(
parms.rqueue.max_sge = max_recv_sge;

if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)) {
- 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);
}
--
1.5.2