svn commit: r253889 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Fri Aug 2 17:44:20 UTC 2013
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 */
More information about the svn-src-head
mailing list