From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Aaron Salter <aaron.k.salter@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 02/13] i40e: Acquire NVM lock before reads on all devices
Date: Tue, 14 Mar 2017 15:32:57 -0700 [thread overview]
Message-ID: <20170314223308.53451-3-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20170314223308.53451-1-jeffrey.t.kirsher@intel.com>
From: Aaron Salter <aaron.k.salter@intel.com>
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: Aaron Salter <aaron.k.salter@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 38ee18f11124..800bd55d0159 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -292,14 +292,14 @@ i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
{
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);
- if (!ret_code) {
+ ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+ if (!ret_code) {
+ if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
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 {
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+ i40e_release_nvm(hw);
}
return ret_code;
}
--
2.12.0
next prev parent reply other threads:[~2017-03-14 22:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 22:32 [net-next 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-03-14 Jeff Kirsher
2017-03-14 22:32 ` [net-next 01/13] i40evf: fix client warnings Jeff Kirsher
2017-03-15 0:39 ` David Miller
2017-03-15 0:44 ` Jeff Kirsher
2017-03-15 0:49 ` David Miller
2017-03-14 22:32 ` Jeff Kirsher [this message]
2017-03-14 22:32 ` [net-next 03/13] i40e: fix up recent proxy and wol bits for X722_SUPPORT Jeff Kirsher
2017-03-14 22:32 ` [net-next 04/13] i40evf: add client interface Jeff Kirsher
2017-03-14 22:33 ` [net-next 05/13] i40e: KISS the " Jeff Kirsher
2017-03-14 22:33 ` [net-next 06/13] i40e: don't add more vectors to num_lan_msix than number of CPUs Jeff Kirsher
2017-03-14 22:33 ` [net-next 07/13] i40e: fix ethtool to get EEPROM data from X722 interface Jeff Kirsher
2017-03-14 22:33 ` [net-next 08/13] i40e: fix RSS queues only operating on PF0 Jeff Kirsher
2017-03-14 22:33 ` [net-next 09/13] i40e: Clarify steps in MAC/VLAN filters initialization routine Jeff Kirsher
2017-03-14 22:33 ` [net-next 10/13] i40e/i40evf: Add support for mapping pages with DMA attributes Jeff Kirsher
2017-03-14 22:33 ` [net-next 11/13] i40e: Allow untrusted VFs to have more filters Jeff Kirsher
2017-03-14 22:33 ` [net-next 12/13] i40e/i40evf: Change version from 1.6.27 to 2.1.7 Jeff Kirsher
2017-03-14 22:33 ` [net-next 13/13] i40e: rename auto_disable_flags to hw_disabled_flags Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170314223308.53451-3-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=aaron.k.salter@intel.com \
--cc=davem@davemloft.net \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox