Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: David Milburn <dmilburn@redhat.com>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-core: set debug logging via module param
Date: Fri, 18 Apr 2008 16:18:01 +0400	[thread overview]
Message-ID: <48089179.40503@ru.mvista.com> (raw)
In-Reply-To: <20080417230406.GA6266@dhcp-210.hsv.redhat.com>

Hello.

David Milburn wrote:

> Set debug level using ata_logging_level module parameter.

> Signed-off-by David Milburn <dmilburn@redhat.com>

> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 733eb94..3fac7f7 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -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;

    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

  reply	other threads:[~2008-04-18 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 23:04 [PATCH] libata-core: set debug logging via module param David Milburn
2008-04-18 12:18 ` Sergei Shtylyov [this message]
2008-04-18 15:32   ` David Milburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48089179.40503@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=dmilburn@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox