src/dpdk/drivers/net/i40e/base/i40e_nvm.c
void i40e_release_nvm(struct i40e_hw *hw)
{
	enum i40e_status_code ret_code = I40E_SUCCESS;
	u32 total_delay = 0;

	DEBUGFUNC("i40e_release_nvm");

	if (hw->nvm.blank_nvm_mode)
		return;

	ret_code = i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL);

	/* there are some rare cases when trying to release the resource
	 * results in an admin Q timeout, so handle them correctly
	 */
	while ((ret_code == I40E_ERR_ADMIN_QUEUE_TIMEOUT) &&
	       (total_delay < hw->aq.asq_cmd_timeout)) {
			i40e_msec_delay(1);
			ret_code = i40e_aq_release_resource(hw,
						I40E_NVM_RESOURCE_ID, 0, NULL);
			total_delay++;
	}
}
/**
 * i40e_release_nvm - Generic request for releasing the NVM ownership
 * @hw: pointer to the HW structure
 *
 * This function will release NVM resource via the proper Admin Command.
 **/
Generic request for releasing the NVM ownership
@hw: pointer to the HW structure

This function will release NVM resource via the proper Admin Command.
Generic request for releasing the NVM ownership @hw : pointer to the HW structure This function will release NVM resource via the proper Admin Command .
void i40e_release_nvm(struct i40e_hw *hw)
{
	enum i40e_status_code ret_code = I40E_SUCCESS;
	u32 total_delay = 0;
	DEBUGFUNC("i40e_release_nvm");
	if (hw->nvm.blank_nvm_mode)
		return;
	ret_code = i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL);
	while ((ret_code == I40E_ERR_ADMIN_QUEUE_TIMEOUT) &&
	       (total_delay < hw->aq.asq_cmd_timeout)) {
			i40e_msec_delay(1);
			ret_code = i40e_aq_release_resource(hw,
						I40E_NVM_RESOURCE_ID, 0, NULL);
			total_delay++;
	}
}
void i40e_release_nvm ( struct i40e_hw * hw ) { enum i40e_status_code ret_code = I40E_SUCCESS ; u32 total_delay = 0 ; DEBUGFUNC ( " " ) ; if ( hw -> nvm . blank_nvm_mode ) return ; ret_code = i40e_aq_release_resource ( hw , I40E_NVM_RESOURCE_ID , 0 , NULL ) ; while ( ( ret_code == I40E_ERR_ADMIN_QUEUE_TIMEOUT ) && ( total_delay < hw -> aq . asq_cmd_timeout ) ) { i40e_msec_delay ( 1 ) ; ret_code = i40e_aq_release_resource ( hw , I40E_NVM_RESOURCE_ID , 0 , NULL ) ; total_delay ++ ; } }
i40e_release_nvm - Generic request for releasing the NVM ownership
 @hw: pointer to the HW structure
i40e_release_nvm - Generic request for releasing the NVM ownership @hw : pointer to the HW structure
/* there are some rare cases when trying to release the resource
	 * results in an admin Q timeout, so handle them correctly
	 */