Skip to content

Commit 28d9a84

Browse files
kadesai16kuba-moo
authored andcommitted
bnxt_en: Always provide max entry and entry size in coredump segments
While populating firmware host logging segments for the coredump, it is possible for the FW command that flushes the segment to fail. When that happens, the existing code will not update the max entry and entry size in the segment header and this causes software that decodes the coredump to skip the segment. The segment most likely has already collected some DMA data, so always update these 2 segment fields in the header to allow the decoder to decode any data in the segment. Fixes: 3c2179e ("bnxt_en: Add FW trace coredump segments to the coredump") Reviewed-by: Shruti Parab <shruti.parab@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20251104005700.542174-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent ff02be0 commit 28d9a84

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,14 @@ static void bnxt_fill_drv_seg_record(struct bnxt *bp,
333333
u32 offset = 0;
334334
int rc = 0;
335335

336+
record->max_entries = cpu_to_le32(ctxm->max_entries);
337+
record->entry_size = cpu_to_le32(ctxm->entry_size);
338+
336339
rc = bnxt_dbg_hwrm_log_buffer_flush(bp, type, 0, &offset);
337340
if (rc)
338341
return;
339342

340343
bnxt_bs_trace_check_wrap(bs_trace, offset);
341-
record->max_entries = cpu_to_le32(ctxm->max_entries);
342-
record->entry_size = cpu_to_le32(ctxm->entry_size);
343344
record->offset = cpu_to_le32(bs_trace->last_offset);
344345
record->wrapped = bs_trace->wrapped;
345346
}

0 commit comments

Comments
 (0)