/* If e1000e_update_nvm_checksum is not called after this function, the EEPROM will most likely contain an invalid checksum.  */
static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
/* If e1000e_update_nvm_checksum is not called after this function, the EEPROM will most likely contain an invalid checksum.  */
static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
{
	s32 ret_val;
	switch (hw->mac.type) {
	case e1000_82573:
	case e1000_82574:
	case e1000_82583:
		ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
		break;
	case e1000_82571:
	case e1000_82572:
		ret_val = e1000e_write_nvm_spi(hw, offset, words, data);
		break;
	default:
		ret_val = -E1000_ERR_NVM;
		break;
	}
	return ret_val;
}