]> www.infradead.org Git - users/hch/configfs.git/commit
ethtool: Add ethtool operation to write to a transceiver module EEPROM
authorIdo Schimmel <idosch@nvidia.com>
Thu, 27 Jun 2024 14:08:48 +0000 (17:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2024 09:48:21 +0000 (10:48 +0100)
commit69540b7987ef05d1dff36981d4cc7c31e9716b36
tree159560489423057dd2982c79ee6d7ebc99aeb087
parent8fda53719a596fa2a2880c42b5fa4126fbbbfc3d
ethtool: Add ethtool operation to write to a transceiver module EEPROM

Ethtool can already retrieve information from a transceiver module
EEPROM by invoking the ethtool_ops::get_module_eeprom_by_page operation.
Add a corresponding operation that allows ethtool to write to a
transceiver module EEPROM.

The new write operation is purely an in-kernel API and is not exposed to
user space.

The purpose of this operation is not to enable arbitrary read / write
access, but to allow the kernel to write to specific addresses as part
of transceiver module firmware flashing. In the future, more
functionality can be implemented on top of these read / write
operations.

Adjust the comments of the 'ethtool_module_eeprom' structure as it is
no longer used only for read access.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h