mlxsw: core: Fix wrong SFP EEPROM reading for upper pages 1-3
authorVadim Pasternak <vadimp@mellanox.com>
Fri, 17 Jul 2020 19:01:43 +0000 (22:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:43 +0000 (10:19 +0200)
commitd3ecfc5c28fd4881a53c3d395768383beffd0edc
tree3d8fb81e34403b1500cf6caa6169edfd57ed4ddc
parentd48db65259a7c7af25b9948e09f9017ad0cc0e0a
mlxsw: core: Fix wrong SFP EEPROM reading for upper pages 1-3

[ Upstream commit 9b8737788af6c76ef93e3161ee2cdc4ddcc034ca ]

Fix wrong reading of upper pages for SFP EEPROM. According to "Memory
Organization" figure in SFF-8472 spec: When reading upper pages 1, 2 and
3 the offset should be set relative to zero and I2C high address 0x51
[1010001X (A2h)] is to be used.

Fixes: a45bfb5a5070 ("mlxsw: core: Extend QSFP EEPROM size for ethtool")
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core_env.c