Re: [PATCH net-next v7 1/9] ethtool: Add ethtool operation to write to a transceiver module EEPROM
From: Andrew Lunn
Date: Mon Jun 24 2024 - 15:01:57 EST
On Mon, Jun 24, 2024 at 08:51:51PM +0300, Danielle Ratson wrote:
> From: Ido Schimmel <idosch@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Danielle Ratson <danieller@xxxxxxxxxx>
> Reviewed-by: Petr Machata <petrm@xxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew