Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a0a0f1e authored by Carolyn Wyborny's avatar Carolyn Wyborny Committed by Jeff Kirsher
Browse files

igb: Fix set_ethtool function to call update nvm for entire image



This patch fixes a problem where we were only checking to update checksum
on first part of nvm image.  Newer parts have multiple checksum fields and
checksum function will accommodate that as long as we call it in the first
place for any changes made.

Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 373e6978
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -811,10 +811,8 @@ static int igb_set_eeprom(struct net_device *netdev,
	ret_val = hw->nvm.ops.write(hw, first_word,
	ret_val = hw->nvm.ops.write(hw, first_word,
				    last_word - first_word + 1, eeprom_buff);
				    last_word - first_word + 1, eeprom_buff);


	/* Update the checksum over the first part of the EEPROM if needed
	/* Update the checksum if nvm write succeeded */
	 * and flush shadow RAM for 82573 controllers
	if (ret_val == 0)
	 */
	if ((ret_val == 0) && ((first_word <= NVM_CHECKSUM_REG)))
		hw->nvm.ops.update(hw);
		hw->nvm.ops.update(hw);


	igb_set_fw_version(adapter);
	igb_set_fw_version(adapter);