svn commit: r308320 - stable/10/sys/dev/cxgbe

John Baldwin jhb at FreeBSD.org
Fri Nov 4 21:52:49 UTC 2016


Author: jhb
Date: Fri Nov  4 21:52:48 2016
New Revision: 308320
URL: https://svnweb.freebsd.org/changeset/base/308320

Log:
  MFC 297883:
  cxgbe(4): Always dispatch all work requests that have been written to the
  descriptor ring before leaving drain_wrq_wr_list.

Modified:
  stable/10/sys/dev/cxgbe/t4_sge.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_sge.c	Fri Nov  4 21:48:22 2016	(r308319)
+++ stable/10/sys/dev/cxgbe/t4_sge.c	Fri Nov  4 21:52:48 2016	(r308320)
@@ -1750,7 +1750,8 @@ drain_wrq_wr_list(struct adapter *sc, st
 	MPASS(TAILQ_EMPTY(&wrq->incomplete_wrs));
 	wr = STAILQ_FIRST(&wrq->wr_list);
 	MPASS(wr != NULL);	/* Must be called with something useful to do */
-	dbdiff = IDXDIFF(eq->pidx, eq->dbidx, eq->sidx);
+	MPASS(eq->pidx == eq->dbidx);
+	dbdiff = 0;
 
 	do {
 		eq->cidx = read_hw_cidx(eq);
@@ -1762,7 +1763,7 @@ drain_wrq_wr_list(struct adapter *sc, st
 		MPASS(wr->wrq == wrq);
 		n = howmany(wr->wr_len, EQ_ESIZE);
 		if (available < n)
-			return;
+			break;
 
 		dst = (void *)&eq->desc[eq->pidx];
 		if (__predict_true(eq->sidx - eq->pidx > n)) {


More information about the svn-src-all mailing list