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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jul 2020 02:07:26 +0000 (19:07 -0700)
commit9b8737788af6c76ef93e3161ee2cdc4ddcc034ca
tree65001b18e340c8bb23761a876fe6dec2463aaa55
parenteea9f73e1ff9b99fbb937d41bb07c5bb2ae9ea2f
mlxsw: core: Fix wrong SFP EEPROM reading for upper pages 1-3

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>
drivers/net/ethernet/mellanox/mlxsw/core_env.c