Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162842127
D58149.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
D58149.diff
View Options
diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h
--- a/sys/dev/ice/ice_lib.h
+++ b/sys/dev/ice/ice_lib.h
@@ -712,6 +712,7 @@
ICE_STATE_MULTIPLE_TCS,
ICE_STATE_DO_FW_DEBUG_DUMP,
ICE_STATE_LINK_ACTIVE_ON_DOWN,
+ ICE_STATE_TOTAL_PORT_SHUTDOWN,
ICE_STATE_FIRST_INIT_LINK,
ICE_STATE_DO_CREATE_MIRR_INTFC,
ICE_STATE_DO_DESTROY_MIRR_INTFC,
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
@@ -4545,6 +4545,11 @@
if ((ret) || (req->newptr == NULL))
return (ret);
+ if (ice_test_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN)) {
+ device_printf(sc->dev,
+ "Setting link_active_on_if_down not supported on this port\n");
+ return (EPERM);
+ }
if (mode)
ice_set_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN);
else
@@ -9872,6 +9877,11 @@
if (sc->hw.debug_mask & ICE_DBG_LINK)
ice_print_ldo_tlv(sc, &tlv);
+ /* Cache the LDO TLV structure in the driver, since it
+ * won't change during the driver's lifetime.
+ */
+ sc->ldo_tlv = tlv;
+
/* Set lenient link mode */
if (ice_is_bit_set(sc->feat_cap, ICE_FEATURE_LENIENT_LINK_MODE) &&
(!(tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE)))
@@ -9893,11 +9903,6 @@
ice_is_bit_set(sc->feat_en, ICE_FEATURE_LENIENT_LINK_MODE) &&
(tlv.options & ICE_LINK_OVERRIDE_EN))
ice_set_bit(ICE_FEATURE_LINK_MGMT_VER_1, sc->feat_en);
-
- /* Cache the LDO TLV structure in the driver, since it
- * won't change during the driver's lifetime.
- */
- sc->ldo_tlv = tlv;
}
/**
diff --git a/sys/dev/ice/ice_strings.c b/sys/dev/ice/ice_strings.c
--- a/sys/dev/ice/ice_strings.c
+++ b/sys/dev/ice/ice_strings.c
@@ -1046,6 +1046,8 @@
return "DO_FW_DEBUG_DUMP";
case ICE_STATE_LINK_ACTIVE_ON_DOWN:
return "LINK_ACTIVE_ON_DOWN";
+ case ICE_STATE_TOTAL_PORT_SHUTDOWN:
+ return "TOTAL_PORT_SHUTDOWN";
case ICE_STATE_FIRST_INIT_LINK:
return "FIRST_INIT_LINK";
case ICE_STATE_DO_CREATE_MIRR_INTFC:
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
@@ -3418,6 +3418,15 @@
/* Do not access PHY config while PHY FW is busy initializing */
} 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;
+
+ ice_set_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN);
+ ice_clear_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN);
+ }
+
ice_init_link_configuration(sc);
ice_update_link_status(sc, true);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 18, 12:23 PM (6 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35180153
Default Alt Text
D58149.diff (2 KB)
Attached To
Mode
D58149: ice(4): Support Total Port Shutdown on E830 devices
Attached
Detach File
Event Timeline
Log In to Comment