Lines Matching refs:eeprom
908 struct ethtool_eeprom *eeprom, u8 *bytes) in i40e_get_eeprom() argument
920 if (eeprom->len == 0) in i40e_get_eeprom()
925 if (eeprom->magic && eeprom->magic != magic) { in i40e_get_eeprom()
930 if ((eeprom->magic >> 16) != hw->device_id) in i40e_get_eeprom()
933 cmd = (struct i40e_nvm_access *)eeprom; in i40e_get_eeprom()
948 eeprom->magic = hw->vendor_id | (hw->device_id << 16); in i40e_get_eeprom()
950 eeprom_buff = kzalloc(eeprom->len, GFP_KERNEL); in i40e_get_eeprom()
962 sectors = eeprom->len / I40E_NVM_SECTOR_SIZE; in i40e_get_eeprom()
963 sectors += (eeprom->len % I40E_NVM_SECTOR_SIZE) ? 1 : 0; in i40e_get_eeprom()
968 len = eeprom->len - (I40E_NVM_SECTOR_SIZE * i); in i40e_get_eeprom()
971 offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i), in i40e_get_eeprom()
995 memcpy(bytes, (u8 *)eeprom_buff, eeprom->len); in i40e_get_eeprom()
1016 struct ethtool_eeprom *eeprom, u8 *bytes) in i40e_set_eeprom() argument
1028 if (eeprom->magic == magic) in i40e_set_eeprom()
1032 if (!eeprom->magic || (eeprom->magic >> 16) != hw->device_id) in i40e_set_eeprom()
1039 cmd = (struct i40e_nvm_access *)eeprom; in i40e_set_eeprom()