]> git.baikalelectronics.ru Git - kernel.git/commit
ice: preserve NVM capabilities in safe mode
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 2 Sep 2020 15:53:42 +0000 (08:53 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 30 Sep 2020 15:32:35 +0000 (08:32 -0700)
commit794f3260578ce8a8035ddbbec8a20e0a7fcded4d
treec4a3b800d0ed56b4c38efad919370121df197237
parent7eedf100a5c94783942f91e4e2955d8a8a0fce10
ice: preserve NVM capabilities in safe mode

If the driver initializes in safe mode, it will call
ice_set_safe_mode_caps. This results in clearing the capabilities
structures, in order to set them up for operating in safe mode, ensuring
many features are disabled.

This has a side effect of also clearing the capability bits that relate
to NVM update. The result is that the device driver will not indicate
support for unified update, even if the firmware is capable.

Fix this by adding the relevant capability fields to the list of values
we preserve. To simplify the code, use a common_cap structure instead of
a handful of local variables. To reduce some duplication of the
capability name, introduce a couple of macros used to restore the
capabilities values from the cached copy.

Fixes: 11ee28970b34 ("ice: Add support for unified NVM update flow capability")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Brijesh Behera <brijeshx.behera@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_common.c