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

Commit a71fc313 authored by Fujinaka, Todd's avatar Fujinaka, Todd Committed by Jeff Kirsher
Browse files

igb: Don't let ethtool try to write to iNVM in i210/i211



Don't let ethtool try to write to iNVM in i210/i211.

This fixes an issue seen by Marek Vasut.

Reported-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarTodd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 76b81748
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -771,8 +771,10 @@ static int igb_set_eeprom(struct net_device *netdev,
	if (eeprom->len == 0)
		return -EOPNOTSUPP;

	if (hw->mac.type == e1000_i211)
	if ((hw->mac.type >= e1000_i210) &&
	    !igb_get_flash_presence_i210(hw)) {
		return -EOPNOTSUPP;
	}

	if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
		return -EFAULT;