summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_common.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2017-10-27 11:06:55 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-11-21 23:25:17 -0800
commit3d72aebfc61b025a2478c9d2bbc3c8c4036a1c05 (patch)
tree488dcd5abb85384f2397dac9e4cd0cb9cd164ab3 /drivers/net/ethernet/intel/i40e/i40e_common.c
parent0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c (diff)
downloadlinux-3d72aebfc61b025a2478c9d2bbc3c8c4036a1c05.tar.gz
linux-3d72aebfc61b025a2478c9d2bbc3c8c4036a1c05.tar.bz2
linux-3d72aebfc61b025a2478c9d2bbc3c8c4036a1c05.zip
i40e: Fix for NUP NVM image downgrade failure
Since commit 96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices") we've used the NVM lock to synchronize NVM reads even on devices which don't strictly need the lock. Doing so can cause a regression on older firmware prior to 1.5, especially when downgrading the firmware. Fix this by only grabbing the lock if we're running on an X722 device (which requires the lock as it uses the AdminQ to read the NVM), or if we're currently running 1.5 or newer firmware. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_common.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 0203665cb53c..13c79468a6da 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -948,7 +948,8 @@ i40e_status i40e_init_shared_code(struct i40e_hw *hw)
hw->pf_id = (u8)(func_rid & 0x7);
if (hw->mac.type == I40E_MAC_X722)
- hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE;
+ hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE |
+ I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;
status = i40e_init_nvm(hw);
return status;