]> 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)
commitbe49b1ad299a638e6181aefc7bdbfd621b46a7ef
treec4a3b800d0ed56b4c38efad919370121df197237
parent0ec86e8e82b57cfb2f83a9de14732002816d3282
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: de9b277ee032 ("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