Control: reassign -1 src:linux 4.9.6-3
Control: retitle -1 e1000: EEPROM write failed on 82540EM
Control: tag -1 upstream

On Fri, 2017-02-24 at 19:52 +0100, Yvan Masson wrote:
> Package: ethtool
> Version: 1:4.8-1
> Severity: normal
> 
> Dear maintainer,
> 
> The EEPROM of my Ethernet NIC has been flushed for some unknown reason.
> I would like to use ethtool to restore my EEPROM (fortunately I have a
> dump).
> 
> Here is one simple "test command" I tried and which should be valid
> according to the manpage and examples found on the net:
> # ethtool --change-eeprom enp2s1 magic 0x100e8086 offset 0x10 length 1 \
> value 0xff
> 
> But unfortunately, I always get this error:
> "Cannot set EEPROM data: Operation not permitted"
> 
> I am probably missing something, in which case please apologize, but
> maybe it is really a bug/something we can not do anymore with recent
> kernels? Maybe what I am probably be missing should be written in the
> manpage or in /usr/share/doc/ethtool/...?
> 
> Do not hesitate to ask if i can provide more information.
[...]

The e1000 driver's low-level EEPROM access functions return error code
1 on failure, and this code is propagated all the way up to the ethtool
program.  But the standard meaning of error code 1 is "Operation not
permitted", so that's what ethtool shows.  So that's a bug in the
driver's error reporting.

As for why the driver failed to access the EEPROM, I can't tell - there
are several possible error cases.  It might be worth trying to pass the
EEPROM contents as a binary file on stdin, instead of trying to set a
single byte.

As the e1000 driver is no longer maintained by Intel, I'm afraid these
bugs are unlikely to be fixed.

Ben.

-- 
Ben Hutchings
All the simple programs have been written, and all the good names
taken.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to