ethtool: Allow network drivers to dump arbitrary EEPROM data
authorVladyslav Tarasiuk <vladyslavt@nvidia.com>
Fri, 9 Apr 2021 08:06:34 +0000 (11:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2021 23:34:56 +0000 (16:34 -0700)
commitc781ff12a2f37a9795e13bf328e5053d3e69f9e0
tree96b00fde6ec2d202004c4186c42701803bb60142
parentcbd3125392846cf94bf14d32b95ef4ec78fc49e1
ethtool: Allow network drivers to dump arbitrary EEPROM data

Define get_module_eeprom_by_page() ethtool callback and implement
netlink infrastructure.

get_module_eeprom_by_page() allows network drivers to dump a part of
module's EEPROM specified by page and bank numbers along with offset and
length. It is effectively a netlink replacement for get_module_info()
and get_module_eeprom() pair, which is needed due to emergence of
complex non-linear EEPROM layouts.

Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ethtool-netlink.rst
include/linux/ethtool.h
include/uapi/linux/ethtool_netlink.h
net/ethtool/Makefile
net/ethtool/eeprom.c [new file with mode: 0644]
net/ethtool/netlink.c
net/ethtool/netlink.h