Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: lpfc: Add additional debugfs support for CMF

Dump raw CMF parameter information in debugfs cgn_buffer.

Link: https://lore.kernel.org/r/20211204002644.116455-9-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

James Smart and committed by
Martin K. Petersen
6014a246 05116ef9

+12 -1
+12 -1
drivers/scsi/lpfc/lpfc_debugfs.c
··· 5484 5484 if (len > (LPFC_CGN_BUF_SIZE - LPFC_DEBUG_OUT_LINE_SZ)) { 5485 5485 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len, 5486 5486 "Truncated . . .\n"); 5487 - break; 5487 + goto out; 5488 5488 } 5489 5489 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len, 5490 5490 "%03x: %08x %08x %08x %08x " ··· 5495 5495 cnt += 32; 5496 5496 ptr += 8; 5497 5497 } 5498 + if (len > (LPFC_CGN_BUF_SIZE - LPFC_DEBUG_OUT_LINE_SZ)) { 5499 + len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len, 5500 + "Truncated . . .\n"); 5501 + goto out; 5502 + } 5503 + len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len, 5504 + "Parameter Data\n"); 5505 + ptr = (uint32_t *)&phba->cgn_p; 5506 + len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len, 5507 + "%08x %08x %08x %08x\n", 5508 + *ptr, *(ptr + 1), *(ptr + 2), *(ptr + 3)); 5498 5509 out: 5499 5510 return simple_read_from_buffer(buf, nbytes, ppos, buffer, len); 5500 5511 }