Thread (14 messages) 14 messages, 2 authors, 2011-09-30

Re: [net-next 11/11] ixgbe: allow eeprom writes via ethtool

flat view

From: Ben Hutchings <hidden>
Date: 2011-09-30 13:52:43

On Thu, 2011-09-29 at 22:24 -0700, Jeff Kirsher wrote:
[...]
quoted hunk ↗ jump to hunk
+static int ixgbe_set_eeprom(struct net_device *netdev,
+			    struct ethtool_eeprom *eeprom, u8 *bytes)
+{
+	struct ixgbe_adapter *adapter = netdev_priv(netdev);
+	struct ixgbe_hw *hw = &adapter->hw;
+	u16 *eeprom_buff;
+	void *ptr;
+	int max_len, first_word, last_word, ret_val = 0;
+	u16 i;
+
+	if (eeprom->len == 0)
+		return -EOPNOTSUPP;
+
+	if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
+		return -EFAULT;
[...]

Both these error codes should be EINVAL.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help