181 u32 attempts = 100000;
192 DEBUGOUT(
"nvm parameter(s) out of bounds\n");
197 for (i = 0; i < words; i++) {
206 for (k = 0; k < attempts; k++) {
216 DEBUGOUT(
"Shadow RAM write EEWR timed out\n");
238 u8 record_type, word_address;
254 if (word_address == address) {
264 DEBUGOUT1(
"Requested word 0x%02x not found in OTP\n", address);
291 DEBUGOUT(
"MAC Addr not found in iNVM\n");
341 DEBUGOUT1(
"NVM word 0x%02x is not mapped.\n", offset);
359 u32 *next_record = NULL;
373 buffer[i] = invm_dword;
377 for (i = 1; i < invm_blocks; i++) {
378 record = &buffer[invm_blocks - i];
379 next_record = &buffer[invm_blocks - i + 1];
399 ((*record & 0x3) == 0)) || (((*record & 0x3) != 0) &&
411 ((*record & 0x3) == 0)) {
424 for (i = 1; i < invm_blocks; i++) {
425 record = &buffer[invm_blocks - i];
426 next_record = &buffer[invm_blocks - i + 1];
435 else if ((((*record & 0x3) == 0) &&
437 ((((*record & 0x3) != 0) && (i != 1)))) {
459 DEBUGFUNC(
"e1000_validate_nvm_checksum_i210");
499 DEBUGFUNC(
"e1000_update_nvm_checksum_i210");
523 DEBUGOUT(
"NVM Read Error while updating checksum.\n");
526 checksum += nvm_data;
533 DEBUGOUT(
"NVM Write Error while updating checksum.\n");
555 bool ret_val =
false;
557 DEBUGFUNC(
"e1000_get_flash_presence_i210");
581 DEBUGOUT(
"Flash update time out\n");
590 DEBUGOUT(
"Flash update complete\n");
592 DEBUGOUT(
"Flash update time out\n");
608 DEBUGFUNC(
"e1000_pool_flash_update_done_i210");
679 DEBUGFUNC(
"e1000_valid_led_default_i210");
712 u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
713 u16 nvm_word, phy_word, pci_word, tmp_nvm;
721 reg_val = mdicnfg & ~E1000_MDICNFG_EXT_MDIO;
761 pci_word &= ~E1000_PCI_PMCSR_D3;
800 DEBUGOUT(
"MNG configuration cycle has not completed.\n");
s32 e1000_init_nvm_params_82575(struct e1000_hw *hw)
void e1000_init_function_pointers_82575(struct e1000_hw *hw)
s32 e1000_init_hw_base(struct e1000_hw *hw)
#define ID_LED_RESERVED_0000
#define E1000_EECD_FLUDONE_I210
#define E1000_NVM_RW_REG_DONE
#define E1000_EECD_FLUPD_I210
#define E1000_CTRL_EXT_PHYPDEN
#define E1000_FLUDONE_ATTEMPTS
#define E1000_CTRL_EXT_SDLPE
#define E1000_NVM_RW_REG_DATA
#define E1000_NVM_RW_ADDR_SHIFT
#define ID_LED_RESERVED_FFFF
#define E1000_CTRL_PHY_RST
#define E1000_EECD_FLASH_DETECTED_I210
#define E1000_NVM_CFG_DONE_PORT_0
#define E1000_ERR_SWFW_SYNC
#define E1000_SWFW_EEP_SM
#define E1000_ERR_INVM_VALUE_NOT_FOUND
#define E1000_NVM_RW_REG_START
#define NVM_RESERVED_WORD
#define E1000_EERD_EEWR_MAX_COUNT
#define NVM_ID_LED_SETTINGS
void e1000_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value)
@ e1000_media_type_internal_serdes
@ e1000_media_type_copper
void e1000_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value)
static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw)
static s32 e1000_pool_flash_update_done_i210(struct e1000_hw *hw)
static s32 e1000_init_nvm_params_i210(struct e1000_hw *hw)
s32 e1000_validate_nvm_checksum_i210(struct e1000_hw *hw)
static void e1000_release_nvm_i210(struct e1000_hw *hw)
s32 e1000_write_nvm_srwr_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
bool e1000_get_flash_presence_i210(struct e1000_hw *hw)
s32 e1000_read_nvm_srrd_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
static s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
static s32 e1000_get_cfg_done_i210(struct e1000_hw *hw)
static s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
s32 e1000_init_hw_i210(struct e1000_hw *hw)
s32 e1000_read_invm_version(struct e1000_hw *hw, struct e1000_fw_version *invm_ver)
static s32 e1000_valid_led_default_i210(struct e1000_hw *hw, u16 *data)
void e1000_init_function_pointers_i210(struct e1000_hw *hw)
static s32 e1000_read_invm_word_i210(struct e1000_hw *hw, u8 address, u16 *data)
s32 e1000_update_nvm_checksum_i210(struct e1000_hw *hw)
s32 e1000_update_flash_i210(struct e1000_hw *hw)
static s32 e1000_read_invm_i210(struct e1000_hw *hw, u16 offset, u16 E1000_UNUSEDARG words, u16 *data)
#define NVM_LED_1_CFG_DEFAULT_I211
#define INVM_DWORD_TO_RECORD_TYPE(invm_dword)
#define NVM_INIT_CTRL_2_DEFAULT_I211
#define E1000_PCI_PMCSR_D3
#define E1000_INVM_AUTOLOAD
#define E1000_INVM_DEFAULT_AL
#define E1000_INVM_ULT_BYTES_SIZE
#define E1000_INVM_MINOR_MASK
#define ID_LED_DEFAULT_I210_SERDES
#define INVM_DWORD_TO_WORD_ADDRESS(invm_dword)
#define E1000_INVM_VER_FIELD_ONE
#define E1000_INVM_MAJOR_SHIFT
#define E1000_PHY_PLL_UNCONF
#define E1000_INVM_RECORD_SIZE_IN_BYTES
#define E1000_INVM_CSR_AUTOLOAD_DATA_SIZE_IN_DWORDS
#define NVM_INIT_CTRL_4_DEFAULT_I211
#define E1000_INVM_RSA_KEY_SHA256_DATA_SIZE_IN_DWORDS
@ E1000_INVM_RSA_KEY_SHA256_STRUCTURE
@ E1000_INVM_UNINITIALIZED_STRUCTURE
@ E1000_INVM_CSR_AUTOLOAD_STRUCTURE
@ E1000_INVM_WORD_AUTOLOAD_STRUCTURE
#define NVM_LED_0_2_CFG_DEFAULT_I211
#define E1000_INVM_PLL_WO_VAL
#define INVM_DWORD_TO_WORD_DATA(invm_dword)
#define E1000_INVM_VER_FIELD_TWO
#define E1000_INVM_MAJOR_MASK
#define E1000_MAX_PLL_TRIES
#define ID_LED_DEFAULT_I210
#define E1000_PHY_PLL_FREQ_REG
#define E1000_INVM_IMGTYPE_FIELD
s32 e1000_acquire_swfw_sync(struct e1000_hw *hw, u16 mask)
void e1000_release_swfw_sync(struct e1000_hw *hw, u16 mask)
s32 e1000_null_ops_generic(struct e1000_hw E1000_UNUSEDARG *hw)
s32 e1000_null_write_nvm(struct e1000_hw E1000_UNUSEDARG *hw, u16 E1000_UNUSEDARG a, u16 E1000_UNUSEDARG b, u16 E1000_UNUSEDARG *c)
s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw)
#define E1000_WRITE_REG(hw, reg, value)
#define E1000_READ_REG(hw, reg)
s32 e1000_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
s32 e1000_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
#define GS40G_PAGE_SELECT
#define E1000_EEARBC_I210
#define E1000_EEMNGCTL_I210
#define E1000_INVM_DATA_REG(_n)
struct e1000_mac_info mac
struct e1000_nvm_info nvm
struct e1000_phy_info phy
struct e1000_mac_operations ops
s32(* id_led_init)(struct e1000_hw *)
struct e1000_nvm_operations ops
void(* release)(struct e1000_hw *)
s32(* init_params)(struct e1000_hw *)
s32(* write)(struct e1000_hw *, u16, u16, u16 *)
s32(* validate)(struct e1000_hw *)
s32(* update)(struct e1000_hw *)
s32(* read)(struct e1000_hw *, u16, u16, u16 *)
s32(* acquire)(struct e1000_hw *)
s32(* valid_led_default)(struct e1000_hw *, u16 *)
enum e1000_media_type media_type
struct e1000_phy_operations ops
s32(* get_cfg_done)(struct e1000_hw *hw)
void(* release)(struct e1000_hw *)
s32(* acquire)(struct e1000_hw *)