diff options
author | Vadim Pasternak <vadimp@mellanox.com> | 2019-05-18 18:58:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-25 19:16:15 +0300 |
commit | 6bc867d1387f6a857f21630e6bf0b74a32e881a9 (patch) | |
tree | 066e5ef54bcc5cb8b20c2e9ce923df7526d22824 /mm/dmapool.c | |
parent | c89c9af998fef2af4e5b2b35fb723693f17e05ef (diff) | |
download | linux-6bc867d1387f6a857f21630e6bf0b74a32e881a9.tar.xz |
mlxsw: core: Prevent reading unsupported slave address from SFP EEPROM
[ Upstream commit f1436c8036fa3632b2ee78841cf5184b7ef0ad87 ]
Prevent reading unsupported slave address from SFP EEPROM by testing
Diagnostic Monitoring Type byte in EEPROM. Read only page zero of
EEPROM, in case this byte is zero.
If some SFP transceiver does not support Digital Optical Monitoring
(DOM), reading SFP EEPROM slave address 0x51 could return an error.
Availability of DOM support is verified by reading from zero page
Diagnostic Monitoring Type byte describing how diagnostic monitoring is
implemented by transceiver. If bit 6 of this byte is set, it indicates
that digital diagnostic monitoring has been implemented. Otherwise it is
not and transceiver could fail to reply to transaction for slave address
0x51 [1010001X (A2h)], which is used to access measurements page.
Such issue has been observed when reading cable MCP2M00-xxxx,
MCP7F00-xxxx, and few others.
Fixes: 2ea109039cd3 ("mlxsw: spectrum: Add support for access cable info via ethtool")
Fixes: 4400081b631a ("mlxsw: spectrum: Fix EEPROM access in case of SFP/SFP+")
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/dmapool.c')
0 files changed, 0 insertions, 0 deletions