Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2018 06:33:54 +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: r333448 - head/sys/dev/cxgbe
Message-ID:  <201805100633.w4A6Xskp080707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu May 10 06:33:54 2018
New Revision: 333448
URL: https://svnweb.freebsd.org/changeset/base/333448

Log:
  cxgbe(4): Disable write-combined doorbells by default.
  
  This had been the default behavior but was changed accidentally as part
  of the recent iw_cxgbe+OFED overhaul.  Fix another bug in that change
  while here: the global knob affects all the adapters in the system and
  should be left alone by per-adapter code.
  
  MFC after:	3 days
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Thu May 10 03:59:48 2018	(r333447)
+++ head/sys/dev/cxgbe/t4_main.c	Thu May 10 06:33:54 2018	(r333448)
@@ -455,7 +455,7 @@ TUNABLE_INT("hw.cxgbe.iscsicaps_allowed", &t4_iscsicap
 static int t4_fcoecaps_allowed = 0;
 TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", &t4_fcoecaps_allowed);
 
-static int t5_write_combine = 1;
+static int t5_write_combine = 0;
 TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine);
 
 static int t4_num_vis = 1;
@@ -2292,7 +2292,6 @@ t4_map_bar_2(struct adapter *sc)
 				setbit(&sc->doorbells, DOORBELL_WCWR);
 				setbit(&sc->doorbells, DOORBELL_UDBWC);
 			} else {
-				t5_write_combine = 0;
 				device_printf(sc->dev,
 				    "couldn't enable write combining: %d\n",
 				    rc);
@@ -2302,11 +2301,9 @@ t4_map_bar_2(struct adapter *sc)
 			t4_write_reg(sc, A_SGE_STAT_CFG,
 			    V_STATSOURCE_T5(7) | mode);
 		}
-#else
-		t5_write_combine = 0;
 #endif
-		sc->iwt.wc_en = t5_write_combine;
 	}
+	sc->iwt.wc_en = isset(&sc->doorbells, DOORBELL_UDBWC) ? 1 : 0;
 
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805100633.w4A6Xskp080707>