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

Commit 5326dfbf authored by Mike Marciniszyn's avatar Mike Marciniszyn Committed by Doug Ledford
Browse files

IB/hfi1: Fix ordering of trace for accuracy



The postitioning of the sdma ibhdr trace was
causing an extra trace message when the tx send
returned -EBUSY.

Move the trace to just before the return
and handle negative return values to avoid
any trace.

Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 1db78eee
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -891,12 +891,15 @@ int hfi1_verbs_send_dma(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
		if (unlikely(ret))
		if (unlikely(ret))
			goto bail_build;
			goto bail_build;
	}
	}
	trace_sdma_output_ibhdr(dd_from_ibdev(qp->ibqp.device),
				&ps->s_txreq->phdr.hdr);
	ret =  sdma_send_txreq(tx->sde, &priv->s_iowait, &tx->txreq);
	ret =  sdma_send_txreq(tx->sde, &priv->s_iowait, &tx->txreq);
	if (unlikely(ret == -ECOMM))
	if (unlikely(ret < 0)) {
		if (ret == -ECOMM)
			goto bail_ecomm;
			goto bail_ecomm;
		return ret;
		return ret;
	}
	trace_sdma_output_ibhdr(dd_from_ibdev(qp->ibqp.device),
				&ps->s_txreq->phdr.hdr);
	return ret;


bail_ecomm:
bail_ecomm:
	/* The current one got "sent" */
	/* The current one got "sent" */