Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fecea0ab authored by Stefan Roscher's avatar Stefan Roscher Committed by Roland Dreier
Browse files

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: default avatarJoachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 18115f45
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -600,8 +600,10 @@ static struct ehca_qp *internal_create_qp(


	if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
	if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
	    && !(context && udata)) { /* no small QP support in userspace ATM */
	    && !(context && udata)) { /* no small QP support in userspace ATM */
		if (HAS_SQ(my_qp))
			ehca_determine_small_queue(
			ehca_determine_small_queue(
				&parms.squeue, max_send_sge, is_llqp);
				&parms.squeue, max_send_sge, is_llqp);
		if (HAS_RQ(my_qp))
			ehca_determine_small_queue(
			ehca_determine_small_queue(
				&parms.rqueue, max_recv_sge, is_llqp);
				&parms.rqueue, max_recv_sge, is_llqp);
		parms.qp_storage =
		parms.qp_storage =
+1 −1
Original line number Original line Diff line number Diff line
@@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
	unsigned long bit;
	unsigned long bit;
	int free_page = 0;
	int free_page = 0;


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


	mutex_lock(&pd->lock);
	mutex_lock(&pd->lock);