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>
This commit is contained in:

committed by
Martin K. Petersen

parent
55d4ce458c
commit
2b01b293f3
@@ -76,9 +76,9 @@
|
||||
#define MPT3SAS_DRIVER_NAME "mpt3sas"
|
||||
#define MPT3SAS_AUTHOR "Avago Technologies <MPT-FusionLinux.pdl@avagotech.com>"
|
||||
#define MPT3SAS_DESCRIPTION "LSI MPT Fusion SAS 3.0 Device Driver"
|
||||
#define MPT3SAS_DRIVER_VERSION "33.101.00.00"
|
||||
#define MPT3SAS_MAJOR_VERSION 33
|
||||
#define MPT3SAS_MINOR_VERSION 101
|
||||
#define MPT3SAS_DRIVER_VERSION "34.100.00.00"
|
||||
#define MPT3SAS_MAJOR_VERSION 34
|
||||
#define MPT3SAS_MINOR_VERSION 100
|
||||
#define MPT3SAS_BUILD_VERSION 0
|
||||
#define MPT3SAS_RELEASE_VERSION 00
|
||||
|
||||
@@ -1472,6 +1472,8 @@ struct MPT3SAS_ADAPTER {
|
||||
u16 device_remove_in_progress_sz;
|
||||
u8 is_gen35_ioc;
|
||||
u8 is_aero_ioc;
|
||||
struct dentry *debugfs_root;
|
||||
struct dentry *ioc_dump;
|
||||
PUT_SMID_IO_FP_HIP put_smid_scsi_io;
|
||||
PUT_SMID_IO_FP_HIP put_smid_fast_path;
|
||||
PUT_SMID_IO_FP_HIP put_smid_hi_priority;
|
||||
@@ -1479,6 +1481,11 @@ struct MPT3SAS_ADAPTER {
|
||||
GET_MSIX_INDEX get_msix_index_for_smlio;
|
||||
};
|
||||
|
||||
struct mpt3sas_debugfs_buffer {
|
||||
void *buf;
|
||||
u32 len;
|
||||
};
|
||||
|
||||
#define MPT_DRV_SUPPORT_BITMAP_MEMMOVE 0x00000001
|
||||
|
||||
typedef u8 (*MPT_CALLBACK)(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
||||
@@ -1782,6 +1789,11 @@ mpt3sas_setup_direct_io(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
|
||||
/* NCQ Prio Handling Check */
|
||||
bool scsih_ncq_prio_supp(struct scsi_device *sdev);
|
||||
|
||||
void mpt3sas_setup_debugfs(struct MPT3SAS_ADAPTER *ioc);
|
||||
void mpt3sas_destroy_debugfs(struct MPT3SAS_ADAPTER *ioc);
|
||||
void mpt3sas_init_debugfs(void);
|
||||
void mpt3sas_exit_debugfs(void);
|
||||
|
||||
/**
|
||||
* _scsih_is_pcie_scsi_device - determines if device is an pcie scsi device
|
||||
* @device_info: bitfield providing information about the device.
|
||||
|
Reference in New Issue
Block a user