Skip to contentSkip to conversation

ice: Fix re-enablement of FW logging after reset

PATCH New Jagielski 1 participant 4 messages Feb 24, 2022 – Feb 25, 2022

Subsystems (2)
lore
Share & tools
lore

Jagielski

#0 lore raw

PATCH 1/1 ice: Fix re-enablement of FW logging after reset

Device resets such as a CORER disable FW logging, and currently, it is not re-enabled by the driver after the reset. This means that FW log messages are not captured even though FW logging was enabled at driver load time.

To fix the issue, call ice_cfg_fw_log() from ice_rebuild() to re-enable the FW logging after a reset.

Fixes 8b97ceb1dc0f ("ice: Enable firmware logging during device initialization.")
---
 drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
 drivers/net/ethernet/intel/ice/ice_common.h | 1 +
 drivers/net/ethernet/intel/ice/ice_main.c   | 5 +++++
 3 files changed, 7 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_common.c +1 -1
index e2af99a763ed..e0e20ad80199 100644
@@ -737,7 +737,7 @@ static int ice_get_fw_log_cfg(struct ice_hw *hw)
  * messages from FW to SW. Interrupts are typically disabled during the device's
  * initialization phase.
  */
-static int ice_cfg_fw_log(struct ice_hw *hw, bool enable)
+int ice_cfg_fw_log(struct ice_hw *hw, bool enable)
 {
 	struct ice_aqc_fw_logging *cmd;
 	u16 i, chgs = 0, len = 0;
drivers/net/ethernet/intel/ice/ice_common.h +1 -0
index 1c57097ddf0b..2d3743a3638e 100644
@@ -174,6 +174,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle,
 int ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle);
 void ice_replay_post(struct ice_hw *hw);
 void ice_output_fw_log(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf);
+int ice_cfg_fw_log(struct ice_hw *hw, bool enable);
 struct ice_q_ctx *
 ice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle);
 int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in);
drivers/net/ethernet/intel/ice/ice_main.c +5 -0
index d72d5d147c75..9c36851d1401 100644
@@ -6646,6 +6646,11 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
 		goto err_init_ctrlq;
 	}
 
+	/* Re-enable FW logging. Not fatal if this fails. */
+	err = ice_cfg_fw_log(hw, true);
+	if (err)
+		dev_dbg(dev, "Failed to re-enable FW logging\n");
+
 	/* if DDP was previously loaded successfully */
 	if (!ice_is_safe_mode(pf)) {
 		/* reload the SW DB of filter tables */
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/1 ice: Fix re-enablement of FW logging after reset

Hi Jedrzej,

Quoted 7 lines · Jedrzej

Device resets such as a CORER disable FW logging, and currently, it is
not re-enabled by the driver after the reset. This means that FW log messages are not captured even though FW logging was enabled at driver
load time.

Quoted 8 lines

To fix the issue, call ice_cfg_fw_log() from ice_rebuild() to re- enable
the FW logging after a reset.

Fixes 8b97ceb1dc0f ("ice: Enable firmware logging during device

initialization.")

Can you check the settings for your email. They don't match:

WARNING: From:/Signed-off-by: email name mismatch: 'From: "Jagielski, Jedrzej" <[email protected]>' != 'Signed-off-by: Jedrzej Jagielski <[email protected]>'

#2 lore raw

PATCH 1/1 ice: Fix re-enablement of FW logging after reset

Hello,

Quoted 9 lines · Jedrzej
Quoted 8 lines

Device resets such as a CORER disable FW logging, and currently, it is not re-enabled by the driver after the reset. This means that FW log messages are not captured even though FW logging was enabled at driver load time.

To fix the issue, call ice_cfg_fw_log() from ice_rebuild() to re- enable the FW logging after a reset.

Quoted 8 lines
Quoted 4 lines
Fixes 8b97ceb1dc0f ("ice: Enable firmware logging during device

initialization.")

Can you check the settings for your email. They don't match:

WARNING: From:/Signed-off-by: email name mismatch: 'From: "Jagielski, Jedrzej" <[email protected]>' != 'Signed-off-by: Jedrzej Jagielski <[email protected]>'

Actually my .gitconfig file has to be automatically overwritten and I have not noticed that.
Shall I send this patch one again in that case?

Thanks,
Jedrzej

#3 lore raw

PATCH 1/1 ice: Fix re-enablement of FW logging after reset

Quoted 20 lines · Jedrzej

Hello,

Quoted 18 lines · Jedrzej
Quoted 8 lines

Device resets such as a CORER disable FW logging, and currently, it is
not re-enabled by the driver after the reset. This means that FW log
messages are not captured even though FW logging was enabled at driver
load time.

Quoted 6 lines

enable the FW logging after a reset.

Fixes 8b97ceb1dc0f ("ice: Enable firmware logging during device

initialization.")

Can you check the settings for your email. They don't match:

Quoted 7 lines
Quoted 3 lines

WARNING: From:/Signed-off-by: email name mismatch: 'From:
"Jagielski, Jedrzej" <[email protected]>' != 'Signed-off-
by: Jedrzej Jagielski <[email protected]>'

?
?Actually my .gitconfig file has to be automatically overwritten and ?I have not noticed that.
?Shall I send this patch one again in that case?

A fixed version would be great.

Thanks,
Tony

Quoted 2 lines

?Thanks,
?Jedrzej