Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2017 06:07:02 +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: r323520 - head/sys/dev/cxgbe
Message-ID:  <201709130607.v8D672Ib048065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Wed Sep 13 06:07:02 2017
New Revision: 323520
URL: https://svnweb.freebsd.org/changeset/base/323520

Log:
  cxgbe(4): Ignore capabilities that depend on TOE when the firmware
  reports TOE is not available.
  
  MFC after:	1 week
  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	Wed Sep 13 04:32:23 2017	(r323519)
+++ head/sys/dev/cxgbe/t4_main.c	Wed Sep 13 06:07:02 2017	(r323520)
@@ -3576,6 +3576,18 @@ get_params__post_init(struct adapter *sc)
 	READ_CAPS(iscsicaps);
 	READ_CAPS(fcoecaps);
 
+	/*
+	 * The firmware attempts memfree TOE configuration for -SO cards and
+	 * will report toecaps=0 if it runs out of resources (this depends on
+	 * the config file).  It may not report 0 for other capabilities
+	 * dependent on the TOE in this case.  Set them to 0 here so that the
+	 * driver doesn't bother tracking resources that will never be used.
+	 */
+	if (sc->toecaps == 0) {
+		sc->iscsicaps = 0;
+		sc->rdmacaps = 0;
+	}
+
 	if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) {
 		param[0] = FW_PARAM_PFVF(ETHOFLD_START);
 		param[1] = FW_PARAM_PFVF(ETHOFLD_END);



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