Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
nvm.c File Reference
#include "e1000.h"

Go to the source code of this file.

Functions

s32 e1000e_poll_eerd_eewr_done (struct e1000_hw *hw, int ee_reg)
 
s32 e1000e_acquire_nvm (struct e1000_hw *hw)
 
void e1000e_release_nvm (struct e1000_hw *hw)
 
s32 e1000e_read_nvm_eerd (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 e1000e_write_nvm_spi (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 e1000_read_pba_string_generic (struct e1000_hw *hw, u8 *pba_num, u32 pba_num_size)
 
s32 e1000_read_mac_addr_generic (struct e1000_hw *hw)
 
s32 e1000e_validate_nvm_checksum_generic (struct e1000_hw *hw)
 
s32 e1000e_update_nvm_checksum_generic (struct e1000_hw *hw)
 
void e1000e_reload_nvm_generic (struct e1000_hw *hw)
 

Function Documentation

s32 e1000_read_mac_addr_generic ( struct e1000_hw hw)

e1000_read_mac_addr_generic - Read device MAC address : pointer to the HW structure

Reads the device MAC address from the EEPROM and stores the value. Since devices with two ports use the same EEPROM, we increment the last bit in the MAC address for the second port.

Definition at line 546 of file nvm.c.

s32 e1000_read_pba_string_generic ( struct e1000_hw hw,
u8 pba_num,
u32  pba_num_size 
)

e1000_read_pba_string_generic - Read device part number : pointer to the HW structure : pointer to device part number : size of part number buffer

Reads the product board assembly (PBA) number from the EEPROM and stores the value in pba_num.

Definition at line 438 of file nvm.c.

s32 e1000e_acquire_nvm ( struct e1000_hw hw)

e1000e_acquire_nvm - Generic request for access to EEPROM : pointer to the HW structure

Set the EEPROM access request bit and wait for EEPROM access grant bit. Return successful if access grant bit set, else clear the request for EEPROM access and return -E1000_ERR_NVM (-1).

Definition at line 176 of file nvm.c.

s32 e1000e_poll_eerd_eewr_done ( struct e1000_hw hw,
int  ee_reg 
)

e1000e_poll_eerd_eewr_done - Poll for EEPROM read/write completion : pointer to the HW structure : EEPROM flag for polling

Polls the EEPROM status bit for either read or write completion based upon the value of 'ee_reg'.

Definition at line 148 of file nvm.c.

s32 e1000e_read_nvm_eerd ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

e1000e_read_nvm_eerd - Reads EEPROM using EERD register : pointer to the HW structure : offset of word in the EEPROM to read : number of words to read : word read from the EEPROM

Reads a 16 bit word from the EEPROM using the EERD register.

Definition at line 318 of file nvm.c.

void e1000e_release_nvm ( struct e1000_hw hw)

e1000e_release_nvm - Release exclusive access to EEPROM : pointer to the HW structure

Stop any current commands to the EEPROM and clear the EEPROM request bit.

Definition at line 250 of file nvm.c.

void e1000e_reload_nvm_generic ( struct e1000_hw hw)

e1000e_reload_nvm_generic - Reloads EEPROM : pointer to the HW structure

Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the extended control register.

Definition at line 634 of file nvm.c.

s32 e1000e_update_nvm_checksum_generic ( struct e1000_hw hw)

e1000e_update_nvm_checksum_generic - Update EEPROM checksum : pointer to the HW structure

Updates the EEPROM checksum by reading/adding each word of the EEPROM up to the checksum. Then calculates the EEPROM checksum and writes the value to the EEPROM.

Definition at line 605 of file nvm.c.

s32 e1000e_validate_nvm_checksum_generic ( struct e1000_hw hw)

e1000e_validate_nvm_checksum_generic - Validate EEPROM checksum : pointer to the HW structure

Calculates the EEPROM checksum by reading/adding each word of the EEPROM and then verifies that the sum of the EEPROM is equal to 0xBABA.

Definition at line 574 of file nvm.c.

s32 e1000e_write_nvm_spi ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

e1000e_write_nvm_spi - Write to EEPROM using SPI : pointer to the HW structure : offset within the EEPROM to be written to : number of words to write : 16 bit word(s) to be written to the EEPROM

Writes data to EEPROM at offset using SPI interface.

If e1000e_update_nvm_checksum is not called after this function , the EEPROM will most likely contain an invalid checksum.

Definition at line 361 of file nvm.c.