Commit 96a39aed authored by Aaron Salter's avatar Aaron Salter Committed by Jeff Kirsher

i40e: Acquire NVM lock before reads on all devices

Acquire NVM lock before reads on all devices.  Previously, locks were
only used for X722 and later.  Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.

Change-ID: If570bb7acf958cef58725ec2a2011cead6f80638
Signed-off-by: default avatarAaron Salter <aaron.k.salter@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 9c79ddaa
...@@ -292,14 +292,14 @@ i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset, ...@@ -292,14 +292,14 @@ i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
{ {
enum i40e_status_code ret_code = 0; enum i40e_status_code ret_code = 0;
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); if (!ret_code) {
if (!ret_code) { if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data); ret_code = i40e_read_nvm_word_aq(hw, offset, data);
i40e_release_nvm(hw); } else {
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
} }
} else { i40e_release_nvm(hw);
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
} }
return ret_code; return ret_code;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment