From: Fujinaka, Todd Date: Wed, 23 Oct 2013 05:52:11 +0000 (+0000) Subject: igb: Don't let ethtool try to write to iNVM in i210/i211 X-Git-Tag: v3.13-rc1~105^2~89^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a71fc313c4f569be5788caff07ef1fe346842c5b;p=~emulex%2Finfiniband.git 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 Signed-off-by: Todd Fujinaka Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 0ae3177416c..b918ba3640f 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;