ice: Add support to print error on PHY FW load failure
Subsystems (2)
PATCH v2 1/1 ice: Add support to print error on PHY FW load failure
Some devices have support for loading the PHY FW and in some cases this can fail. When this fails, the FW will set the corresponding bit in the link info structure. Also, the FW will send a link event if the correct link event mask bit is set. Add support for printing an error message when the PHY FW load fails during any link configuration flow and the link event flow.
Since ice_check_module_power() is already doing something very similar add a new function ice_check_link_cfg_err() so any failures reported in the link info's link_cfg_err member can be printed in this one function.
Also, add the new ICE_FLAG_PHY_FW_LOAD_FAILED bit to the PF's flags so we don't constantly print this error message during link polling if the value never changed.
---
v2: Use correct bit for checking link_cfg_err
drivers/net/ethernet/intel/ice/ice.h | 1 + .../net/ethernet/intel/ice/ice_adminq_cmd.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 49 +++++++++++++++++-- 3 files changed, 47 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
@@ -478,6 +478,7 @@ enum ice_pf_flags {ICE_FLAG_NO_MEDIA ,ICE_FLAG_FW_LLDP_AGENT ,ICE_FLAG_MOD_POWER_UNSUPPORTED , +ICE_FLAG_PHY_FW_LOAD_FAILED ,ICE_FLAG_ETHTOOL_CTXT ,/* set when ethtool holds RTNL lock */ ICE_FLAG_LEGACY_RX , ICE_FLAG_VF_TRUE_PROMISC_ENA,
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -0
@@ -1187,6 +1187,7 @@ struct ice_aqc_get_link_status_data {#define ICE_AQ_LINK_TOPO_UNSUPP_MEDIA BIT(7)u8 link_cfg_err;#define ICE_AQ_LINK_MODULE_POWER_UNSUPPORTED BIT(5) +#define ICE_AQ_LINK_EXTERNAL_PHY_LOAD_FAILURE BIT(6)#define ICE_AQ_LINK_INVAL_MAX_POWER_LIMIT BIT(7)u8 link_info;#define ICE_AQ_LINK_UP BIT(0)/* Link Status */
@@ -1270,6 +1271,7 @@ struct ice_aqc_set_event_mask {#define ICE_AQ_LINK_EVENT_AN_COMPLETED BIT(7)#define ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL BIT(8)#define ICE_AQ_LINK_EVENT_PORT_TX_SUSPENDED BIT(9) +#define ICE_AQ_LINK_EVENT_PHY_FW_LOAD_FAIL BIT(12)u8 reserved1[6 ]; };
drivers/net/ethernet/intel/ice/ice_main.c +44 -5
91 lines not on this page · raw message
Signature · 1 line
2.26.3
Mekala
PATCH v2 1/1 ice: Add support to print error on PHY FW load failure
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Brett Creeley
Sent: Wednesday, October 13, 2021 9:02 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v2] ice: Add support to print error on PHY FW load failureSome devices have support for loading the PHY FW and in some cases this can fail. When this fails, the FW will set the corresponding bit in the link info structure. Also, the FW will send a link event if the correct link event mask bit is set. Add support > for printing an error message when the PHY FW load fails during any link configuration flow and the link event flow.
Since
ice_check_module_power()is already doing something very similar add a new functionice_check_link_cfg_err()so any failures reported in the link info'slink_cfg_errmember can be printed in this one function.Also, add the new
ICE_FLAG_PHY_FW_LOAD_FAILEDbit to the PF's flags so we don't constantly print this error message during link polling if the value never changed.
Quoted 9 lines
Signed-off-by Brett Creeley <[email protected]>---
v2: Use correct bit for checkinglink_cfg_errdrivers/net/ethernet/intel/ice/ice.h | 1 + .../net/ethernet/intel/ice/ice_adminq_cmd.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 49 +++++++++++++++++-- 3 files changed, 47 insertions(+), 5 deletions(-)