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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to