diff options
author | np <np@FreeBSD.org> | 2016-04-12 22:11:29 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2016-04-12 22:11:29 +0000 |
commit | b38b6a219df4fa5f8d62cea220e3b503bcd469ea (patch) | |
tree | ef203a745277bedb9ddfc428f24776330a7937ac | |
parent | 421a097e61c3dfaa2a3729b5bb15d1a16b5d7b7a (diff) | |
download | FreeBSD-src-b38b6a219df4fa5f8d62cea220e3b503bcd469ea.zip FreeBSD-src-b38b6a219df4fa5f8d62cea220e3b503bcd469ea.tar.gz |
cxgbe(4): Always dispatch all work requests that have been written to the
descriptor ring before leaving drain_wrq_wr_list.
-rw-r--r-- | sys/dev/cxgbe/t4_sge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index daf3b8a..fd4f291 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -1726,7 +1726,8 @@ drain_wrq_wr_list(struct adapter *sc, struct sge_wrq *wrq) 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); @@ -1738,7 +1739,7 @@ drain_wrq_wr_list(struct adapter *sc, struct sge_wrq *wrq) 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)) { |