Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/ixgbe_common.c
Show First 20 Lines • Show All 5,142 Lines • ▼ Show 20 Lines | void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, | ||||
struct ixgbe_nvm_version *nvm_ver) | struct ixgbe_nvm_version *nvm_ver) | ||||
{ | { | ||||
u16 rel_num, prod_ver, mod_len, cap, offset; | u16 rel_num, prod_ver, mod_len, cap, offset; | ||||
nvm_ver->oem_valid = FALSE; | nvm_ver->oem_valid = FALSE; | ||||
hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset); | hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset); | ||||
/* Return is offset to OEM Product Version block is invalid */ | /* Return is offset to OEM Product Version block is invalid */ | ||||
if (offset == 0x0 && offset == NVM_INVALID_PTR) | if (offset == 0x0 || offset == NVM_INVALID_PTR) | ||||
return; | return; | ||||
/* Read product version block */ | /* Read product version block */ | ||||
hw->eeprom.ops.read(hw, offset, &mod_len); | hw->eeprom.ops.read(hw, offset, &mod_len); | ||||
hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_CAP_OFF, &cap); | hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_CAP_OFF, &cap); | ||||
/* Return if OEM product version block is invalid */ | /* Return if OEM product version block is invalid */ | ||||
if (mod_len != NVM_OEM_PROD_VER_MOD_LEN || | if (mod_len != NVM_OEM_PROD_VER_MOD_LEN || | ||||
▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines |