libata-core: set debug logging via module param
PATCH 1/1 libata-core: set debug logging via module param
Set debug level using ata_logging_level module parameter.
Signed-off-by David Milburn <[email protected]>
--- libata-core.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
drivers/ata/libata-core.c +6 -8
@@ -158,6 +158,10 @@ int libata_allow_tpm = 0;module_param_named (allow_tpm, libata_allow_tpm, int,0444 );MODULE_PARM_DESC (allow_tpm,"Permit the use of TPM commands" ); +unsigned int ata_logging_level; +module_param (ata_logging_level, int,0444 ); +MODULE_PARM_DESC (ata_logging_level,"Bit mask of logging levels" ); +MODULE_AUTHOR ("Jeff Garzik" );MODULE_DESCRIPTION ("Library module for ATA devices" );MODULE_LICENSE ("GPL" );
@@ -5190,14 +5194,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host) ap->dev = host->dev; ap->last_ctl =0xFF ; -#if defined(ATA_VERBOSE_DEBUG ) -/* turn on all debugging levels */ - ap->msg_enable =0x00FF ; -#elif defined(ATA_DEBUG ) - ap->msg_enable =ATA_MSG_DRV |ATA_MSG_INFO |ATA_MSG_CTL |ATA_MSG_WARN |ATA_MSG_ERR ; -#else - ap->msg_enable =ATA_MSG_DRV |ATA_MSG_ERR |ATA_MSG_WARN ; -#endif +/* set debugging level */ + ap->msg_enable = ata_logging_level;#ifdef CONFIG_ATA_SFF INIT_DELAYED_WORK (&ap->port_task, ata_pio_task);
Hello.
Quoted 23 lines · David Milburn
Set debug level using
ata_logging_levelmodule parameter.Signed-off-by David Milburn <[email protected]>
drivers/ata/libata-core.c +4
-0@@ -158,6 +158,10 @@ int libata_allow_tpm = 0;module_param_named (allow_tpm, libata_allow_tpm, int,0444 );MODULE_PARM_DESC (allow_tpm,"Permit the use of TPM commands" ); +unsigned int ata_logging_level; +module_param (ata_logging_level, int,0444 ); +MODULE_PARM_DESC (ata_logging_level,"Bit mask of logging levels" ); +MODULE_AUTHOR ("Jeff Garzik" );MODULE_DESCRIPTION ("Library module for ATA devices" );MODULE_LICENSE ("GPL" );@@ -5190,14 +5194,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host) ap->dev = host->dev; ap->last_ctl =0xFF ;
drivers/ata/libata-core.c struct ata_port *ata_port_alloc(struct ata_host *host) · line 5198
Quoted 10 lines
drivers/ata/libata-core.c +2
-8-#if defined(ATA_VERBOSE_DEBUG ) -/* turn on all debugging levels */ - ap->msg_enable =0x00FF ; -#elif defined(ATA_DEBUG ) - ap->msg_enable =ATA_MSG_DRV |ATA_MSG_INFO |ATA_MSG_CTL |ATA_MSG_WARN |ATA_MSG_ERR ; -#else - ap->msg_enable =ATA_MSG_DRV |ATA_MSG_ERR |ATA_MSG_WARN ; -#endif +/* set debugging level */ + ap->msg_enable = ata_logging_level;
This sets the default mask to show no log messages instead of ATA_MSG_DRV
| ATA_MSG_ERR | ATA_MSG_WARN as it was before the patch.
WBR, Sergei
Quoted 7 lines · Sergei Shtylyov
Hello.
This sets the default mask to show no log messages instead of
ATA_MSG_DRV|ATA_MSG_ERR|ATA_MSG_WARNas it was before the patch.WBR, Sergei
Thanks Sergei, I will repost.
David