]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlxsw: spectrum: Fix EEPROM access in case of SFP/SFP+
authorArkadi Sharshevsky <arkadis@mellanox.com>
Mon, 11 Sep 2017 07:42:26 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:01 +0000 (11:56 +0200)
commit0ec58e18e6e5e493646dd151a9096d3f14b4169e
tree4a10a8271c086e698536d384e52f1324f908ae0f
parent6bcb6a2f55955c2cd1398745ff7ed41368c8660b
mlxsw: spectrum: Fix EEPROM access in case of SFP/SFP+

[ Upstream commit 4400081b631af69abc63cea3352680e3d85e0c39 ]

The current code does not handle correctly the access to the upper page
in case of SFP/SFP+ EEPROM. In that case the offset should be local
and the I2C address should be changed.

Fixes: 2ea109039cd3 ("mlxsw: spectrum: Add support for access cable info via ethtool")
Reported-by: Florian Klink <flokli@flokli.de>
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c