Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
e1000_i210.c File Reference
#include <linux/types.h>
#include <linux/if_ether.h>
#include "e1000_hw.h"
#include "e1000_i210.h"

Go to the source code of this file.

Functions

s32 igb_acquire_nvm_i210 (struct e1000_hw *hw)
 
void igb_release_nvm_i210 (struct e1000_hw *hw)
 
s32 igb_acquire_swfw_sync_i210 (struct e1000_hw *hw, u16 mask)
 
void igb_release_swfw_sync_i210 (struct e1000_hw *hw, u16 mask)
 
s32 igb_read_nvm_srrd_i210 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 igb_write_nvm_srwr_i210 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 igb_read_nvm_i211 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 igb_read_invm_i211 (struct e1000_hw *hw, u16 address, u16 *data)
 
s32 igb_validate_nvm_checksum_i210 (struct e1000_hw *hw)
 
s32 igb_update_nvm_checksum_i210 (struct e1000_hw *hw)
 
s32 igb_update_flash_i210 (struct e1000_hw *hw)
 
s32 igb_valid_led_default_i210 (struct e1000_hw *hw, u16 *data)
 

Function Documentation

s32 igb_acquire_nvm_i210 ( struct e1000_hw hw)

igb_acquire_nvm_i210 - Request for access to EEPROM : pointer to the HW structure

Acquire the necessary semaphores for exclusive access to the EEPROM. 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 53 of file e1000_i210.c.

s32 igb_acquire_swfw_sync_i210 ( struct e1000_hw hw,
u16  mask 
)

igb_acquire_swfw_sync_i210 - Acquire SW/FW semaphore : pointer to the HW structure : specifies which semaphore to acquire

Acquire the SW/FW semaphore to access the PHY or NVM. The mask will also specify which port we're acquiring the lock for.

Definition at line 78 of file e1000_i210.c.

s32 igb_read_invm_i211 ( struct e1000_hw hw,
u16  address,
u16 data 
)

igb_read_invm_i211 - Reads OTP : pointer to the HW structure : the word address (aka eeprom offset) to read : pointer to the data read

Reads 16-bit words from the OTP. Return error when the word is not stored in OTP.

Definition at line 392 of file e1000_i210.c.

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

igb_read_nvm_i211 - Read NVM wrapper function for I211 : pointer to the HW structure : the word address (aka eeprom offset) to read : pointer to the data read

Wrapper function to return data formerly found in the NVM.

Definition at line 339 of file e1000_i210.c.

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

igb_read_nvm_srrd_i210 - Reads Shadow Ram using EERD register : pointer to the HW structure : offset of word in the Shadow Ram to read : number of words to read : word read from the Shadow Ram

Reads a 16 bit word from the Shadow Ram using the EERD register. Uses necessary synchronization semaphores.

Definition at line 204 of file e1000_i210.c.

void igb_release_nvm_i210 ( struct e1000_hw hw)

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

Stop any current commands to the EEPROM and clear the EEPROM request bit, then release the semaphores acquired.

Definition at line 65 of file e1000_i210.c.

void igb_release_swfw_sync_i210 ( struct e1000_hw hw,
u16  mask 
)

igb_release_swfw_sync_i210 - Release SW/FW semaphore : pointer to the HW structure : specifies which semaphore to acquire

Release the SW/FW semaphore used to access the PHY or NVM. The mask will also specify which port we're releasing the lock for.

Definition at line 126 of file e1000_i210.c.

s32 igb_update_flash_i210 ( struct e1000_hw hw)

igb_update_flash_i210 - Commit EEPROM to the flash : pointer to the HW structure

Definition at line 526 of file e1000_i210.c.

s32 igb_update_nvm_checksum_i210 ( struct e1000_hw hw)

igb_update_nvm_checksum_i210 - 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. Next commit EEPROM data onto the Flash.

Definition at line 469 of file e1000_i210.c.

s32 igb_valid_led_default_i210 ( struct e1000_hw hw,
u16 data 
)

igb_valid_led_default_i210 - Verify a valid default LED config : pointer to the HW structure : pointer to the NVM (EEPROM)

Read the EEPROM for the current default LED configuration. If the LED configuration is not valid, set to a valid LED configuration.

Definition at line 580 of file e1000_i210.c.

s32 igb_validate_nvm_checksum_i210 ( struct e1000_hw hw)

igb_validate_nvm_checksum_i210 - 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 432 of file e1000_i210.c.

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

igb_write_nvm_srwr_i210 - Write to Shadow RAM using EEWR : pointer to the HW structure : offset within the Shadow RAM to be written to : number of words to write : 16 bit word(s) to be written to the Shadow RAM

Writes data to Shadow RAM at offset using EEWR register.

If e1000_update_nvm_checksum is not called after this function , the data will not be committed to FLASH and also Shadow RAM will most likely contain an invalid checksum.

If error code is returned, data and Shadow RAM may be inconsistent - buffer partially written.

Definition at line 247 of file e1000_i210.c.