Skip to content

Commit 1dbe61b

Browse files
Luojiaxing1991martinkpetersen
authored andcommitted
scsi: hisi_sas: Enable debugfs support by default
Add a config option to enable debugfs support by default. And if debugfs support is enabled by default, dump count default value is increased to 50 as generally users want something bigger than the current default in that situation. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Luo Jiaxing <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 69bfa5f commit 1dbe61b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

drivers/scsi/hisi_sas/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ config SCSI_HISI_SAS_PCI
1818
depends on ACPI
1919
help
2020
This driver supports HiSilicon's SAS HBA based on PCI device
21+
22+
config SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE
23+
bool "HiSilicon SAS debugging default enable"
24+
depends on SCSI_HISI_SAS
25+
help
26+
Set Y to default enable DEBUGFS for SCSI_HISI_SAS

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,12 +2722,21 @@ int hisi_sas_remove(struct platform_device *pdev)
27222722
}
27232723
EXPORT_SYMBOL_GPL(hisi_sas_remove);
27242724

2725+
#if IS_ENABLED(CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE)
2726+
#define DEBUGFS_ENABLE_DEFAULT "enabled"
2727+
bool hisi_sas_debugfs_enable = true;
2728+
u32 hisi_sas_debugfs_dump_count = 50;
2729+
#else
2730+
#define DEBUGFS_ENABLE_DEFAULT "disabled"
27252731
bool hisi_sas_debugfs_enable;
2732+
u32 hisi_sas_debugfs_dump_count = 1;
2733+
#endif
2734+
27262735
EXPORT_SYMBOL_GPL(hisi_sas_debugfs_enable);
27272736
module_param_named(debugfs_enable, hisi_sas_debugfs_enable, bool, 0444);
2728-
MODULE_PARM_DESC(hisi_sas_debugfs_enable, "Enable driver debugfs (default disabled)");
2737+
MODULE_PARM_DESC(hisi_sas_debugfs_enable,
2738+
"Enable driver debugfs (default "DEBUGFS_ENABLE_DEFAULT")");
27292739

2730-
u32 hisi_sas_debugfs_dump_count = 1;
27312740
EXPORT_SYMBOL_GPL(hisi_sas_debugfs_dump_count);
27322741
module_param_named(debugfs_dump_count, hisi_sas_debugfs_dump_count, uint, 0444);
27332742
MODULE_PARM_DESC(hisi_sas_debugfs_dump_count, "Number of debugfs dumps to allow");

0 commit comments

Comments
 (0)