Date: Fri, 2 Aug 2013 17:44:19 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253889 - head/sys/dev/cxgbe Message-ID: <201308021744.r72HiJuL015638@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Fri Aug 2 17:44:19 2013 New Revision: 253889 URL: http://svnweb.freebsd.org/changeset/base/253889 Log: Fix previous commit (r253873). "cong" has one bit per channel but the congestion channel map has 1 nibble per channel. So bits wxyz need to be blown up into 000w000x000y000z. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Aug 2 17:13:29 2013 (r253888) +++ head/sys/dev/cxgbe/t4_sge.c Fri Aug 2 17:44:19 2013 (r253889) @@ -1878,7 +1878,16 @@ alloc_iq_fl(struct port_info *pi, struct param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | V_FW_PARAMS_PARAM_YZ(iq->cntxt_id); - val = cong ? cong | 2 << 19 : 1 << 19; + if (cong == 0) + val = 1 << 19; + else { + val = 2 << 19; + for (i = 0; i < 4; i++) { + if (cong & (1 << i)) + val |= 1 << (i << 2); + } + } + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); if (rc != 0) { /* report error but carry on */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308021744.r72HiJuL015638>