scsi: mpt3sas: Capture IOC data for debugging purposes
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Tue, 28 Apr 2020 06:45:22 +0000 (02:45 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 May 2020 02:24:27 +0000 (22:24 -0400)
commit2b01b293f359ddd67e08bbe8def42a7082310b82
treeedb5eeefa61090ab226e3c65859157949e81b37e
parent55d4ce458c77f21fd20711f23ab8540e904d10c3
scsi: mpt3sas: Capture IOC data for debugging purposes

Information needed to debug driver problems and firmware faults is stored
in the IOC’s MPT3SAS_ADAPTER data structure. Parameters such as IOCFacts,
IOC flags (related to sge, MSI-X, error recovery etc.), performance mode
type, TMs, internal commands reply status, etc. are present.

For debugging purposes, it is therefore helpful to be able to capture this
information so that the fault can be analyzed. Export the MPT3SAS_ADAPTER
data structure in debugfs. The data is available in:

 /sys/kernel/debug/mpt3sas/scsi_hostX/ioc_dump

Link: https://lore.kernel.org/r/1588056322-29227-1-git-send-email-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/Makefile
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_debugfs.c [new file with mode: 0644]
drivers/scsi/mpt3sas/mpt3sas_scsih.c