Skip to content
/ linux Public

Commit 3dfb511

Browse files
idoschkuba-moo
authored andcommitted
ethtool: Add transceiver module extended state
Add an extended state and sub-state to describe link issues related to transceiver modules. The 'ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY' extended sub-state tells user space that port is unable to gain a carrier because the CMIS Module State Machine did not reach the ModuleReady (Fully Operational) state. For example, if the module is stuck at ModuleLowPwr or ModuleFault state. In case of the latter, user space can read the fault reason from the module's EEPROM and potentially reset it. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0455dc5 commit 3dfb511

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

Documentation/networking/ethtool-netlink.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ Link extended states:
528528
power required from cable or module
529529

530530
``ETHTOOL_LINK_EXT_STATE_OVERHEAT`` The module is overheated
531+
532+
``ETHTOOL_LINK_EXT_STATE_MODULE`` Transceiver module issue
531533
================================================ ============================================
532534

533535
Link extended substates:
@@ -621,6 +623,14 @@ Link extended substates:
621623
``ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE`` Cable test failure
622624
=================================================== ============================================
623625

626+
Transceiver module issue substates:
627+
628+
=================================================== ============================================
629+
``ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY`` The CMIS Module State Machine did not reach
630+
the ModuleReady state. For example, if the
631+
module is stuck at ModuleFault state
632+
=================================================== ============================================
633+
624634
DEBUG_GET
625635
=========
626636

include/linux/ethtool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ struct ethtool_link_ext_state_info {
9494
enum ethtool_link_ext_substate_link_logical_mismatch link_logical_mismatch;
9595
enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity;
9696
enum ethtool_link_ext_substate_cable_issue cable_issue;
97+
enum ethtool_link_ext_substate_module module;
9798
u8 __link_ext_substate;
9899
};
99100
};

include/uapi/linux/ethtool.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ enum ethtool_link_ext_state {
603603
ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
604604
ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
605605
ETHTOOL_LINK_EXT_STATE_OVERHEAT,
606+
ETHTOOL_LINK_EXT_STATE_MODULE,
606607
};
607608

608609
/* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
@@ -649,6 +650,11 @@ enum ethtool_link_ext_substate_cable_issue {
649650
ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
650651
};
651652

653+
/* More information in addition to ETHTOOL_LINK_EXT_STATE_MODULE. */
654+
enum ethtool_link_ext_substate_module {
655+
ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY = 1,
656+
};
657+
652658
#define ETH_GSTRING_LEN 32
653659

654660
/**

0 commit comments

Comments
 (0)