Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174879567
D59578.id187067.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59578.id187067.diff
View Options
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
@@ -9699,15 +9699,33 @@
}
return;
}
+ ice_debug(hw, ICE_DBG_LINK,
+ "%s IFF_UP: %d, media: %d, TPS: %d, link_active_on_if_down: %d\n",
+ __func__,
+ (if_getflags(sc->ifp) & IFF_UP) != 0,
+ (pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) != 0,
+ ice_test_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN),
+ ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN));
if (pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) {
ice_clear_state(&sc->state, ICE_STATE_NO_MEDIA);
- /* Apply default link settings */
- if (!ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN)) {
+ if ((if_getflags(sc->ifp) & IFF_UP) != 0 ||
+ ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN)) {
+ /* Apply default link settings if link was administratively
+ * brought up or link_active_on_if_down flag is enabled */
+ ice_debug(hw, ICE_DBG_LINK,
+ "%s: applying saved phy cfg\n",
+ __func__);
+ ice_apply_saved_phy_cfg(sc, ICE_APPLY_LS_FEC_FC);
+ } else {
+ /* Either link_active_on_if_down is disabled or
+ * Total Port Shutdown is enabled in NVM */
+ ice_debug(hw, ICE_DBG_LINK,
+ "%s: bringing link down\n",
+ __func__);
ice_set_link(sc, false);
ice_set_state(&sc->state, ICE_STATE_LINK_STATUS_REPORTED);
- } else
- ice_apply_saved_phy_cfg(sc, ICE_APPLY_LS_FEC_FC);
+ }
} else {
/* Set link down, and poll for media available in timer. This prevents the
* driver from receiving spurious link-related events.
diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c
--- a/sys/dev/ice/if_ice_iflib.c
+++ b/sys/dev/ice/if_ice_iflib.c
@@ -3583,10 +3583,8 @@
} else {
ice_clear_state(&sc->state, ICE_STATE_PHY_FW_INIT_PENDING);
- if (ice_is_e830(hw)) {
- if (!(sc->ldo_tlv.options & ICE_LINK_OVERRIDE_PORT_DIS))
- return;
-
+ if (ice_is_e830(hw) &&
+ (sc->ldo_tlv.options & ICE_LINK_OVERRIDE_PORT_DIS) != 0) {
ice_set_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN);
ice_clear_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 7, 5:51 PM (3 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40281110
Default Alt Text
D59578.id187067.diff (2 KB)
Attached To
Mode
D59578: ice(4): Fix link bringup on driver load
Attached
Detach File
Event Timeline
Log In to Comment