linux_dsm_epyc7002/drivers/net/ethernet/intel/ice
Jacob Keller b2ccf317ed ice: update fw version check logic
We have MAX_FW_API_VER_BRANCH, MAX_FW_API_VER_MAJOR, and
MAX_FW_API_VER_MINOR that we use in ice_controlq.h to test when a
firmware version is newer than expected. This is currently tested by
comparing each field separately. Thus, we compare the branch field
against the MAX_FW_API_VER_BRANCH, and so forth.

This means that currently, if we suppose that the max firmware version
is defined as 0.2.1, i.e.

Then firmware 0.1.3 will fail to load. This is because the minor version
3 is greater than the max minor version 1.

This is not intuitive, because of the notion that increasing the major
firmware version to 2 should mean any firmware version with a major
version is less than 2 should be considered older than 2...

In order to allow both 0.2.1 and 0.1.3 to load, you would have to define
the "max" firmware version as 0.2.3.. It is possible that such
a firmware version doesn't even exist yet!

Fix this by replacing the current logic with an updated check that
behaves as follows:

First, we check the major version. If it is greater than the expected
version, then we prevent driver load. Additionally, a warning message is
logged to indicate to the system administrator that they need to update
their driver. This is now the only case where the driver will refuse to
load.

Second, if the major version is less than the expected version, we log
an information message indicating the NVM should be updated.

Third, if the major version is exact, we'll then check the minor
version. If the minor version is more than two versions less than
expected, we log an information message indicating the NVM should be
updated. If it is more than two versions greater than the expected
version, we log an information message that the driver should be
updated.

To support this, the ice_aq_ver_check function needs its signature
updated to pass the HW structure. Since we now pass this structure,
there is no need to pass the firmware API versions separately.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-09-28 11:16:36 -07:00
..
ice_adminq_cmd.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_common.c ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_common.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_controlq.c ice: update fw version check logic 2018-09-28 11:16:36 -07:00
ice_controlq.h ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_devids.h ice: update branding strings and supported device ids 2018-09-28 11:16:36 -07:00
ice_ethtool.c ice: Implement handlers for ethtool PHY/link operations 2018-08-28 10:48:26 -07:00
ice_hw_autogen.h ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_lan_tx_rx.h ice: Rework flex descriptor programming 2018-08-28 09:18:47 -07:00
ice_main.c ice: update branding strings and supported device ids 2018-09-28 11:16:36 -07:00
ice_nvm.c ice: Update request resource command to latest specification 2018-08-28 10:17:06 -07:00
ice_osdep.h ice: Start hardware initialization 2018-03-26 09:59:08 -07:00
ice_sched.c ice: Updates to Tx scheduler code 2018-08-28 09:58:13 -07:00
ice_sched.h ice: Update Tx scheduler tree for VSI multi-Tx queue support 2018-03-26 12:21:42 -07:00
ice_status.h ice: Prevent control queue operations during reset 2018-08-28 10:20:00 -07:00
ice_switch.c ice: Implement ice_bridge_getlink and ice_bridge_setlink 2018-08-28 11:01:06 -07:00
ice_switch.h ice: Implement ice_bridge_getlink and ice_bridge_setlink 2018-08-28 11:01:06 -07:00
ice_txrx.c ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_txrx.h ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_type.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice.h ice: Introduce SERVICE_DIS flag and service routine functions 2018-08-28 11:11:18 -07:00
Makefile ice: Add stats and ethtool support 2018-03-26 12:11:19 -07:00