提交 cc0ca2d5 编写于 作者: M Michael Chan 提交者: Zheng Zengkai

bnxt_en: Consolidate firmware reset event logging.

stable inclusion
from stable-5.10.68
commit 01cad477a96834c16f76019698aac57c779893b4
bugzilla: 182671 https://gitee.com/openeuler/kernel/issues/I4EWUH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=01cad477a96834c16f76019698aac57c779893b4

--------------------------------

[ Upstream commit 5863b10a ]

Combine the three netdev_warn() calls into a single call, printed at
the NETIF_MSG_HW log level.
Reviewed-by: NVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
Acked-by: NWillem de Bruijn <willemb@google.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5e58d42c
...@@ -2082,10 +2082,9 @@ static int bnxt_async_event_process(struct bnxt *bp, ...@@ -2082,10 +2082,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
goto async_event_process_exit; goto async_event_process_exit;
set_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event); set_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event);
break; break;
case ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY: case ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY: {
if (netif_msg_hw(bp)) char *fatal_str = "non-fatal";
netdev_warn(bp->dev, "Received RESET_NOTIFY event, data1: 0x%x, data2: 0x%x\n",
data1, data2);
if (!bp->fw_health) if (!bp->fw_health)
goto async_event_process_exit; goto async_event_process_exit;
...@@ -2097,14 +2096,18 @@ static int bnxt_async_event_process(struct bnxt *bp, ...@@ -2097,14 +2096,18 @@ static int bnxt_async_event_process(struct bnxt *bp,
if (!bp->fw_reset_max_dsecs) if (!bp->fw_reset_max_dsecs)
bp->fw_reset_max_dsecs = BNXT_DFLT_FW_RST_MAX_DSECS; bp->fw_reset_max_dsecs = BNXT_DFLT_FW_RST_MAX_DSECS;
if (EVENT_DATA1_RESET_NOTIFY_FATAL(data1)) { if (EVENT_DATA1_RESET_NOTIFY_FATAL(data1)) {
netdev_warn(bp->dev, "Firmware fatal reset event received\n"); fatal_str = "fatal";
set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state); set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state);
} else { }
netdev_warn(bp->dev, "Firmware non-fatal reset event received, max wait time %d msec\n", if (netif_msg_hw(bp)) {
netdev_warn(bp->dev, "Firmware %s reset event, data1: 0x%x, data2: 0x%x, min wait %u ms, max wait %u ms\n",
fatal_str, data1, data2,
bp->fw_reset_min_dsecs * 100,
bp->fw_reset_max_dsecs * 100); bp->fw_reset_max_dsecs * 100);
} }
set_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event); set_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event);
break; break;
}
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册