https://github.com/torvalds/linux
Revision e0fb6fb6d52686134b2ece144060219591d4f8d3 authored by Guenter Roeck on 31 October 2014, 03:50:15 UTC, committed by David S. Miller on 31 October 2014, 20:12:34 UTC
If a driver supports reading EEPROM but no EEPROM is installed in the system,
the driver's get_eeprom_len function returns 0. ethtool will subsequently
try to read that zero-length EEPROM anyway. If the driver does not support
EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
does support EEPROM access but no EEPROM is installed, the operation will
return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1e19e08
History
Tip revision: e0fb6fb6d52686134b2ece144060219591d4f8d3 authored by Guenter Roeck on 31 October 2014, 03:50:15 UTC
net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0
Tip revision: e0fb6fb
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.7 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.8 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 284.0 KB
Makefile -rw-r--r-- 53.1 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top