Browse Source

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: Marek Vasut <marex@denx.de>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Fujinaka, Todd 11 years ago
parent
commit
a71fc313c4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/net/ethernet/intel/igb/igb_ethtool.c

+ 3 - 1
drivers/net/ethernet/intel/igb/igb_ethtool.c

@@ -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;