Skip to contentSkip to conversation

IB/ehca: Ensure non-existing queues aren't made small queues

PATCH In review Stefan Roscher 1 participant 1 message Aug 8, 2007 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 2/7 IB/ehca: Ensure non-existing queues aren't made small queues

---
 drivers/infiniband/hw/ehca/ehca_qp.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/infiniband/hw/ehca/ehca_qp.c +6 -4
index cfa83fa..13b61c3 100644
@@ -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);
 	}
Signature · 1 line
1.5.2