summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorFujinaka, Todd <todd.fujinaka@intel.com>2013-10-23 05:52:11 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-11-01 06:04:52 -0700
commita71fc313c4f569be5788caff07ef1fe346842c5b (patch)
tree672ecc0d175f3804633cf36a3f4218d4c617efb0 /drivers/net/ethernet/intel/igb/igb_ethtool.c
parent76b81748d43f2c60774c2703e3a9390bcc552adb (diff)
downloadlinux-stable-a71fc313c4f569be5788caff07ef1fe346842c5b.tar.gz
linux-stable-a71fc313c4f569be5788caff07ef1fe346842c5b.tar.bz2
linux-stable-a71fc313c4f569be5788caff07ef1fe346842c5b.zip
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 0ae3177416c7..b918ba3640f9 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/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;