From bc367c55cdfb9bfe54a2db926cd1b42cc682e86d Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 15 Jun 2020 10:04:29 +0800 Subject: [PATCH] net/ice/base: gate devices from FW link override Currently, the FW link override feature is only permitted for E810 devices. However, the ice_fw_supports_link_override() guards against FW versions irrespective of the device. This assumes FW versions between the families are aligned, which is not the case. Signed-off-by: Jeb Cramer Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 38ffd5203a..499653c214 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -4357,6 +4357,10 @@ enum ice_fw_modes ice_get_fw_mode(struct ice_hw *hw) */ bool ice_fw_supports_link_override(struct ice_hw *hw) { + /* Currently, only supported for E810 devices */ + if (hw->mac_type != ICE_MAC_E810) + return false; + if (hw->api_maj_ver == ICE_FW_API_LINK_OVERRIDE_MAJ) { if (hw->api_min_ver > ICE_FW_API_LINK_OVERRIDE_MIN) return true; -- 2.20.1