src/dpdk/drivers/net/i40e/base/i40e_nvm.c
enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
					 u16 *data)
{
	enum i40e_status_code ret_code = I40E_SUCCESS;

	if (hw->flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK)
		ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);

	if (ret_code)
		return ret_code;
	ret_code = __i40e_read_nvm_word(hw, offset, data);

	if (hw->flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK)
		i40e_release_nvm(hw);
	return ret_code;
}
/**
 * i40e_read_nvm_word - Reads NVM word, acquires lock if necessary
 * @hw: pointer to the HW structure
 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
 * @data: word read from the Shadow RAM
 *
 * Reads one 16 bit word from the Shadow RAM.
 **/
Reads NVM word, acquires lock if necessary
@hw: pointer to the HW structure
@offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
@data: word read from the Shadow RAM

Reads one 16 bit word from the Shadow RAM.
Reads NVM word acquires lock if necessary @hw : pointer to the HW structure @offset : offset of the Shadow RAM word to read ( 0x000000 - 0x001FFF ) @data : word read from the Shadow RAM Reads one 16 bit word from the Shadow RAM .
enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
					 u16 *data)
{
	enum i40e_status_code ret_code = I40E_SUCCESS;
	if (hw->flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK)
		ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
	if (ret_code)
		return ret_code;
	ret_code = __i40e_read_nvm_word(hw, offset, data);
	if (hw->flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK)
		i40e_release_nvm(hw);
	return ret_code;
}
enum i40e_status_code i40e_read_nvm_word ( struct i40e_hw * hw , u16 offset , u16 * data ) { enum i40e_status_code ret_code = I40E_SUCCESS ; if ( hw -> flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ) ret_code = i40e_acquire_nvm ( hw , I40E_RESOURCE_READ ) ; if ( ret_code ) return ret_code ; ret_code = __i40e_read_nvm_word ( hw , offset , data ) ; if ( hw -> flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ) i40e_release_nvm ( hw ) ; return ret_code ; }
i40e_read_nvm_word - Reads NVM word, acquires lock if necessary
 @hw: pointer to the HW structure
 @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
 @data: word read from the Shadow RAM
i40e_read_nvm_word - Reads NVM word acquires lock if necessary @hw : pointer to the HW structure @offset : offset of the Shadow RAM word to read ( 0x000000 - 0x001FFF ) @data : word read from the Shadow RAM