From: Alexander Duyck When a fault is reported to the FW health reporter, devlink takes a dump and the dump callback requests the FW coredump with the create flag set. If the FW has no stored coredump, it creates one from its current state and writes it to flash. A missed heartbeat on a healthy FW, for example while the host is stalled, then produces a coredump that looks like a crash. devlink passes the report context to the dump callback for a reported fault and NULL for a dump the user requests. Only set the create flag when the context is NULL, so an automatic dump returns the stored coredump or fails if there is none. Fixes: 005a54722e9d ("eth: fbnic: add FW health reporter") Signed-off-by: Alexander Duyck --- drivers/net/ethernet/meta/fbnic/fbnic_devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c index 0b653c4c20a7..1f7e6e78ac92 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c @@ -385,7 +385,8 @@ static int fbnic_fw_reporter_dump(struct devlink_health_reporter *reporter, if (!fw_cmpl) return -ENOMEM; - err = fbnic_fw_xmit_coredump_info_msg(fbd, fw_cmpl, true); + /* Only create a new coredump when the user asks for one */ + err = fbnic_fw_xmit_coredump_info_msg(fbd, fw_cmpl, !priv_ctx); if (err) { NL_SET_ERR_MSG_MOD(extack, "Failed to transmit core dump info msg");