Commit 1596847d authored by Edwin Peer's avatar Edwin Peer Committed by David S. Miller

bnxt_en: improve error recovery information messages

The recovery election messages are often mistaken for errors. Improve
the wording to clarify the meaning of these frequent and expected
events. Also, take the first step towards more inclusive language.
Signed-off-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 892a662f
...@@ -2150,17 +2150,18 @@ static int bnxt_async_event_process(struct bnxt *bp, ...@@ -2150,17 +2150,18 @@ static int bnxt_async_event_process(struct bnxt *bp,
} }
case ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY: { case ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY: {
struct bnxt_fw_health *fw_health = bp->fw_health; struct bnxt_fw_health *fw_health = bp->fw_health;
char *status_desc = "healthy";
u32 status;
if (!fw_health) if (!fw_health)
goto async_event_process_exit; goto async_event_process_exit;
if (!EVENT_DATA1_RECOVERY_ENABLED(data1)) { if (!EVENT_DATA1_RECOVERY_ENABLED(data1)) {
fw_health->enabled = false; fw_health->enabled = false;
netif_info(bp, drv, bp->dev, netif_info(bp, drv, bp->dev, "Driver recovery watchdog is disabled\n");
"Error recovery info: error recovery[0]\n");
break; break;
} }
fw_health->master = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1);
fw_health->tmr_multiplier = fw_health->tmr_multiplier =
DIV_ROUND_UP(fw_health->polling_dsecs * HZ, DIV_ROUND_UP(fw_health->polling_dsecs * HZ,
bp->current_interval * 10); bp->current_interval * 10);
...@@ -2170,10 +2171,13 @@ static int bnxt_async_event_process(struct bnxt *bp, ...@@ -2170,10 +2171,13 @@ static int bnxt_async_event_process(struct bnxt *bp,
bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG); bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
fw_health->last_fw_reset_cnt = fw_health->last_fw_reset_cnt =
bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG); bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
status = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
if (status != BNXT_FW_STATUS_HEALTHY)
status_desc = "unhealthy";
netif_info(bp, drv, bp->dev, netif_info(bp, drv, bp->dev,
"Error recovery info: error recovery[1], master[%d], reset count[%u], health status: 0x%x\n", "Driver recovery watchdog, role: %s, firmware status: 0x%x (%s), resets: %u\n",
fw_health->master, fw_health->last_fw_reset_cnt, fw_health->primary ? "primary" : "backup", status,
bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG)); status_desc, fw_health->last_fw_reset_cnt);
if (!fw_health->enabled) { if (!fw_health->enabled) {
/* Make sure tmr_counter is set and visible to /* Make sure tmr_counter is set and visible to
* bnxt_health_check() before setting enabled to true. * bnxt_health_check() before setting enabled to true.
...@@ -11469,7 +11473,7 @@ static void bnxt_force_fw_reset(struct bnxt *bp) ...@@ -11469,7 +11473,7 @@ static void bnxt_force_fw_reset(struct bnxt *bp)
} }
bnxt_fw_reset_close(bp); bnxt_fw_reset_close(bp);
wait_dsecs = fw_health->master_func_wait_dsecs; wait_dsecs = fw_health->master_func_wait_dsecs;
if (fw_health->master) { if (fw_health->primary) {
if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU)
wait_dsecs = 0; wait_dsecs = 0;
bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW; bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
...@@ -12141,7 +12145,7 @@ static void bnxt_fw_reset_task(struct work_struct *work) ...@@ -12141,7 +12145,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
return; return;
} }
if (!bp->fw_health->master) { if (!bp->fw_health->primary) {
u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs;
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
......
...@@ -1536,7 +1536,7 @@ struct bnxt_fw_health { ...@@ -1536,7 +1536,7 @@ struct bnxt_fw_health {
u32 last_fw_heartbeat; u32 last_fw_heartbeat;
u32 last_fw_reset_cnt; u32 last_fw_reset_cnt;
u8 enabled:1; u8 enabled:1;
u8 master:1; u8 primary:1;
u8 fatal:1; u8 fatal:1;
u8 status_reliable:1; u8 status_reliable:1;
u8 tmr_multiplier; u8 tmr_multiplier;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment