i40e: Move NVM variable out of AQ struct
authorShannon Nelson <shannon.nelson@intel.com>
Fri, 1 Apr 2016 10:56:09 +0000 (03:56 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 7 Apr 2016 01:45:11 +0000 (18:45 -0700)
The NVM update status info should stay collected together, not
spread across different structs.

Change-ID: Ic16f9e9fd79945d865bb7226184c889884585025
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>
drivers/net/ethernet/intel/i40e/i40e_adminq.c
drivers/net/ethernet/intel/i40e/i40e_adminq.h
drivers/net/ethernet/intel/i40e/i40e_nvm.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_adminq.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index df8e2fd6a649a34511bc094bf659718f943192d5..e8278e1d61302c484db0991469db8f399dc90954 100644 (file)
@@ -624,7 +624,7 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
 
        /* pre-emptive resource lock release */
        i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL);
-       hw->aq.nvm_release_on_done = false;
+       hw->nvm_release_on_done = false;
        hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
 
        ret_code = i40e_aq_set_hmc_resource_profile(hw,
@@ -1024,9 +1024,9 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
        hw->aq.arq.next_to_use = ntu;
 
        if (i40e_is_nvm_update_op(&e->desc)) {
-               if (hw->aq.nvm_release_on_done) {
+               if (hw->nvm_release_on_done) {
                        i40e_release_nvm(hw);
-                       hw->aq.nvm_release_on_done = false;
+                       hw->nvm_release_on_done = false;
                }
 
                switch (hw->nvmupd_state) {
index 12fbbddea299efdf39a441bc922418efd97ebd40..d92aad38afdc5fb0669e3f9d58329685e2af4644 100644 (file)
@@ -97,7 +97,6 @@ struct i40e_adminq_info {
        u32 fw_build;                   /* firmware build number */
        u16 api_maj_ver;                /* api major version */
        u16 api_min_ver;                /* api minor version */
-       bool nvm_release_on_done;
 
        struct mutex asq_mutex; /* Send queue lock */
        struct mutex arq_mutex; /* Receive queue lock */
index 5730f8091e1bcd9d27df122ee8375f3feeb6117d..1ae29ac8c310ececa45316ae53853cc399042ea2 100644 (file)
@@ -696,7 +696,7 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,
        i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d cmd 0x%08x config 0x%08x offset 0x%08x data_size 0x%08x\n",
                   i40e_nvm_update_state_str[upd_cmd],
                   hw->nvmupd_state,
-                  hw->aq.nvm_release_on_done,
+                  hw->nvm_release_on_done,
                   cmd->command, cmd->config, cmd->offset, cmd->data_size);
 
        if (upd_cmd == I40E_NVMUPD_INVALID) {
@@ -799,7 +799,7 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
                        if (status) {
                                i40e_release_nvm(hw);
                        } else {
-                               hw->aq.nvm_release_on_done = true;
+                               hw->nvm_release_on_done = true;
                                hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
                        }
                }
@@ -815,7 +815,7 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
                        if (status) {
                                i40e_release_nvm(hw);
                        } else {
-                               hw->aq.nvm_release_on_done = true;
+                               hw->nvm_release_on_done = true;
                                hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
                        }
                }
@@ -849,7 +849,7 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
                                   -EIO;
                                i40e_release_nvm(hw);
                        } else {
-                               hw->aq.nvm_release_on_done = true;
+                               hw->nvm_release_on_done = true;
                                hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
                        }
                }
@@ -953,7 +953,7 @@ retry:
                                   -EIO;
                        hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
                } else {
-                       hw->aq.nvm_release_on_done = true;
+                       hw->nvm_release_on_done = true;
                        hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
                }
                break;
@@ -980,7 +980,7 @@ retry:
                                   -EIO;
                        hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
                } else {
-                       hw->aq.nvm_release_on_done = true;
+                       hw->nvm_release_on_done = true;
                        hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
                }
                break;
index 3335f9d13374d154b6c64a75fc5646ebe3dad2dc..bf693580f9c4e8f55f0e39543ca81dda57b73cfe 100644 (file)
@@ -549,6 +549,7 @@ struct i40e_hw {
        enum i40e_nvmupd_state nvmupd_state;
        struct i40e_aq_desc nvm_wb_desc;
        struct i40e_virt_mem nvm_buff;
+       bool nvm_release_on_done;
 
        /* HMC info */
        struct i40e_hmc_info hmc; /* HMC info struct */
index a3eae5d9a2bd4416c2f53336c0ba10e435182025..1f9b3b5d946d3e02ee1aff52d1671feaa7195b2c 100644 (file)
@@ -97,7 +97,6 @@ struct i40e_adminq_info {
        u32 fw_build;                   /* firmware build number */
        u16 api_maj_ver;                /* api major version */
        u16 api_min_ver;                /* api minor version */
-       bool nvm_release_on_done;
 
        struct mutex asq_mutex; /* Send queue lock */
        struct mutex arq_mutex; /* Receive queue lock */
index 301fe2b6dd03b153f6c3d0814ca25ef84e69af1a..d68e017079e33c0c171da56e8e072e02c8c1436d 100644 (file)
@@ -522,6 +522,7 @@ struct i40e_hw {
        enum i40e_nvmupd_state nvmupd_state;
        struct i40e_aq_desc nvm_wb_desc;
        struct i40e_virt_mem nvm_buff;
+       bool nvm_release_on_done;
 
        /* HMC info */
        struct i40e_hmc_info hmc; /* HMC info struct */