]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Add support for module EEPROM read by page
authorIdo Schimmel <idosch@nvidia.com>
Mon, 21 Jun 2021 07:50:41 +0000 (10:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jun 2021 19:33:05 +0000 (12:33 -0700)
commit38d307a0822c3fd2d8d651a1963328e55a6eff1f
tree7fca126adf0316b8f0768649d741d6c7980c707a
parentb6ca195eca669603470dd751de39279c73646161
mlxsw: core: Add support for module EEPROM read by page

Add support for ethtool_ops::get_module_eeprom_by_page() which allows
user space to read transceiver module EEPROM based on passed parameters.

The I2C address is not validated in order to avoid module-specific code.
In case of wrong address, error will be returned from device's firmware.

Tested by comparing output with legacy method (ioctl) output.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_env.c
drivers/net/ethernet/mellanox/mlxsw/core_env.h
drivers/net/ethernet/mellanox/mlxsw/minimal.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c