Page MenuHomeFreeBSD

D60168.diff
No OneTemporary

D60168.diff

diff --git a/sys/dev/ice/ice_ddp_common.c b/sys/dev/ice/ice_ddp_common.c
--- a/sys/dev/ice/ice_ddp_common.c
+++ b/sys/dev/ice/ice_ddp_common.c
@@ -2527,25 +2527,35 @@
/* check reset was triggered already or not */
reg = rd32(hw, GLGEN_RSTAT);
if (reg & GLGEN_RSTAT_DEVSTATE_M) {
- /* Reset is in progress, re-init the hw again */
ice_debug(hw, ICE_DBG_INIT, "Reset is in progress. layer topology might be applied already\n");
ice_check_reset(hw);
- return 0;
+ /* Reset is in progress, re-init the hw again */
+ goto reinit_hw;
}
/* set new topology */
status = ice_get_set_tx_topo(hw, new_topo, size, NULL, NULL, true);
if (status) {
- ice_debug(hw, ICE_DBG_INIT, "Set tx topology is failed\n");
- return status;
+ ice_debug(hw, ICE_DBG_INIT, "Failed setting Tx topology, status %d\n",
+ status);
+ status = ICE_ERR_CFG;
}
- /* new topology is updated, delay 1 second before issuing the CORRER */
- for (i = 0; i < 10; i++)
- ice_msec_delay(100, true);
- ice_reset(hw, ICE_RESET_CORER);
- /* CORER will clear the global lock, so no explicit call
- * required for release
+ /* Even if Tx topology config failed, we need to CORE reset here to
+ * clear the global configuration lock. Delay 1 second to allow
+ * hardware to settle then issue a CORER
*/
- return 0;
+ ice_msec_delay(1000, true);
+ ice_reset(hw, ICE_RESET_CORER);
+ ice_check_reset(hw);
+
+reinit_hw:
+ /* Since we triggered a CORER, re-initialize hardware */
+ ice_deinit_hw(hw);
+ if (ice_init_hw(hw)) {
+ ice_debug(hw, ICE_DBG_INIT, "Failed to re-init hardware after setting Tx topology\n");
+ return ICE_ERR_RESET_FAILED;
+ }
+
+ return status;
}
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
@@ -528,8 +528,6 @@
/* Setup ControlQ lengths */
ice_set_ctrlq_len(hw);
-reinit_hw:
-
fw_mode = ice_get_fw_mode(hw);
if (fw_mode == ICE_FW_MODE_REC) {
device_printf(dev, "Firmware recovery mode detected. Limiting functionality. Refer to Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode.\n");
@@ -574,15 +572,7 @@
if (err)
goto deinit_hw;
- /*
- * Success indicates a change was made that requires a reinitialization
- * of the hardware
- */
- err = ice_load_pkg_file(sc);
- if (!err) {
- ice_deinit_hw(hw);
- goto reinit_hw;
- }
+ ice_load_pkg_file(sc);
err = ice_init_link_events(sc);
if (err) {

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 1, 7:26 PM (6 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40035344
Default Alt Text
D60168.diff (2 KB)

Event Timeline