Author: np
Date: Sat Jan 14 15:43:31 2017
New Revision: 312186
URL: https://svnweb.freebsd.org/changeset/base/312186

Log:
  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.

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    Sat Jan 14 15:43:04 2017        
(r312185)
+++ stable/10/sys/dev/cxgbe/t4_sge.c    Sat Jan 14 15:43:31 2017        
(r312186)
@@ -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
        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);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to