cxgbe(4): Ignore capabilities that depend on TOE when the firmware

reports TOE is not available.

MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2017-09-13 06:07:02 +00:00
parent 0e5d767884
commit efeb46889f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323520

View File

@ -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);