summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_adminq.c
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2015-08-28 17:55:49 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-09-17 17:47:16 -0700
commit2f1b5bc844a7c13a3ec997a7ce029f27403adc57 (patch)
tree8cd5e093e519a55c409ea709dced8783d661158f /drivers/net/ethernet/intel/i40e/i40e_adminq.c
parent0af8e9db2ce93d17c25a0ff0a044dfebf66ea5af (diff)
downloadlinux-2f1b5bc844a7c13a3ec997a7ce029f27403adc57.tar.gz
linux-2f1b5bc844a7c13a3ec997a7ce029f27403adc57.tar.bz2
linux-2f1b5bc844a7c13a3ec997a7ce029f27403adc57.zip
i40e/i40evf: add wait states to NVM state machine
This adds wait states to the NVM update state machine to signify when waiting for an update operation to finish, whether we're in the middle of a set of Write operations, or we're now idle but waiting. Change-ID: Iabe91d6579ef6a2ea560647e374035656211ab43 Signed-off-by: Shannon Nelson <shannon.nelson@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_adminq.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_adminq.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 8a77f59f57aa..ea1e930b52cf 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -1018,6 +1018,19 @@ clean_arq_element_out:
i40e_release_nvm(hw);
hw->aq.nvm_release_on_done = false;
}
+
+ switch (hw->nvmupd_state) {
+ case I40E_NVMUPD_STATE_INIT_WAIT:
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ break;
+
+ case I40E_NVMUPD_STATE_WRITE_WAIT:
+ hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING;
+ break;
+
+ default:
+ break;
+ }
}
return ret_code;