Page MenuHomeFreeBSD

D61965.1795610233.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61965.1795610233.diff

diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c
--- a/sys/dev/ice/ice_lib.c
+++ b/sys/dev/ice/ice_lib.c
@@ -10181,18 +10181,21 @@
struct ice_hw *hw = &sc->hw;
device_t dev = sc->dev;
int status;
+ u8 report_mode;
u64 phy_low, phy_high;
/*
- * If the FW supports Link Management V2 we don't need
- * to save initial PHY configuration as it can be always
- * read from FW.
+ * Link Management V2 can obtain speed defaults directly from firmware,
+ * but FEC and flow-control requests are still cached in ice_phy_info and
+ * consumed by ice_apply_saved_phy_cfg(). Leaving those fields zeroed
+ * turns the default FEC request into ICE_FEC_NONE and clears the module's
+ * RS-FEC capabilities on the first PHY configuration.
*/
+ report_mode = ICE_AQC_REPORT_TOPO_CAP_MEDIA;
if (ice_is_bit_set(sc->feat_en, ICE_FEATURE_LINK_MGMT_VER_2))
- return;
+ report_mode = ICE_AQC_REPORT_DFLT_CFG;
- status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA,
- &pcaps, NULL);
+ status = ice_aq_get_phy_caps(pi, false, report_mode, &pcaps, NULL);
if (status) {
device_printf(dev,
"%s: ice_aq_get_phy_caps failed; status %s, aq_err %s\n",
@@ -10206,8 +10209,9 @@
phy_high = le64toh(pcaps.phy_type_high);
/* Save off initial config parameters */
- pi->phy.curr_user_speed_req =
- ice_aq_phy_types_to_link_speeds(phy_low, phy_high);
+ if (!ice_is_bit_set(sc->feat_en, ICE_FEATURE_LINK_MGMT_VER_2))
+ pi->phy.curr_user_speed_req =
+ ice_aq_phy_types_to_link_speeds(phy_low, phy_high);
pi->phy.curr_user_fec_req = ice_caps_to_fec_mode(pcaps.caps,
pcaps.link_fec_options);
pi->phy.curr_user_fc_req = ice_caps_to_fc_mode(pcaps.caps);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 25, 12:37 PM (22 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41963973
Default Alt Text
D61965.1795610233.diff (1 KB)

Event Timeline