On 8/13/20 8:08 AM, Adrian Pop wrote:
The Common Management Interface Specification (CMIS) for QSFP-DD shares some similarities with other form factors such as QSFP or SFP, but due to the fact that the module memory map is different, the current ethtool version is not able to provide relevant information about an interface. This patch adds QSFP-DD support to ethtool. The changes are similar to the ones already existing in qsfp.c, but customized to use the memory addresses and logic as defined in the specifications document. Several functions from qsfp.c could be reused, so an additional parameter was added to each and the functions were moved to sff-common.c. Diff from v1: * Report cable length in meters instead of kilometers * Fix bad value for QSFP_DD_DATE_VENDOR_LOT_OFFSET * Fix initialization for struct qsfp_dd_diags * Remove unrelated whitespace cleanups in qsfp.c and Makefile.am Diff from v2: * Remove functions assuming the existance of page 0x10 and 0x11 * Remove structs and constants related to the page 0x10 and 0x11 Diff from v3: * Added missing Signed-off-by and Tested-by tags Diff from v4: * Fix whitespace formatting problems Signed-off-by: Adrian Pop <popadrian1...@gmail.com> Tested-by: Ido Schimmel <ido...@mellanox.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> ---
Reviewed-by: Paul Schmidt <paschm...@nvidia.com> (proxying for Paul CC'ed, who has reviewed and relayed some offline feedback on v1) Thanks Adrian and Ido