summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2017-01-14 15:43:31 +0000
committernp <np@FreeBSD.org>2017-01-14 15:43:31 +0000
commit22a3996a815cd51e41845c60f1bfe106a743b3d8 (patch)
tree5902e254ed8c33428686f791ff7cfd7c151363df
parent483e52d35925be6f099ec8ab4bfd5eace19592e7 (diff)
downloadFreeBSD-src-22a3996a815cd51e41845c60f1bfe106a743b3d8.zip
FreeBSD-src-22a3996a815cd51e41845c60f1bfe106a743b3d8.tar.gz
MFC r311831 and r311832.
r311831: cxgbe(4): The wraparound logic in start_wrq_wr() should not get involved in work requests that end at the end of the descriptor ring, even though the pidx wraps around to 0. r311832: cxgbe(4): Enable automatic cidx flush for all control queues.
-rw-r--r--sys/dev/cxgbe/t4_sge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 9152d9f..d831f94 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -2289,7 +2289,7 @@ slowpath:
w = &eq->desc[eq->pidx];
IDXINCR(eq->pidx, ndesc, eq->sidx);
- if (__predict_false(eq->pidx < ndesc - 1)) {
+ if (__predict_false(cookie->pidx + ndesc > eq->sidx)) {
w = &wrq->ss[0];
wrq->ss_pidx = cookie->pidx;
wrq->ss_len = len16 * 16;
@@ -3296,12 +3296,13 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq)
c.cmpliqid_eqid = htonl(V_FW_EQ_CTRL_CMD_CMPLIQID(eq->iqid));
c.physeqid_pkd = htobe32(0);
c.fetchszm_to_iqid =
- htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) |
+ htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) |
F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid));
c.dcaen_to_eqsize =
htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) |
+ V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) |
V_FW_EQ_CTRL_CMD_EQSIZE(qsize));
c.eqaddr = htobe64(eq->ba);
OpenPOWER on IntegriCloud