Patchwork [Resend] ATA: Debugging options for the ATA subsystem

login
register
mail settings
Submitter Viresh KUMAR
Date June 9, 2011, 3:56 a.m.
Message ID <e6eda088c6d3761ac4f5d1719489be61356e3a8a.1307591731.git.viresh.kumar@st.com>
Download mbox | patch
Permalink /patch/99612/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Viresh KUMAR - June 9, 2011, 3:56 a.m.
This adds Kconfig options for DEBUG and VERBOSE_DEBUG to the ATA subsystem

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/ata/Kconfig  |   14 ++++++++++++++
 drivers/ata/Makefile |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
Jeff Garzik - July 23, 2011, 10:17 p.m.
On 06/08/2011 11:56 PM, Viresh Kumar wrote:
> This adds Kconfig options for DEBUG and VERBOSE_DEBUG to the ATA subsystem
>
> Signed-off-by: Viresh Kumar<viresh.kumar@st.com>
> ---
>   drivers/ata/Kconfig  |   14 ++++++++++++++
>   drivers/ata/Makefile |    2 ++
>   2 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 5dd1e4c..e1ac908 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -22,6 +22,20 @@ menuconfig ATA
>
>   if ATA
>
> +config ATA_DEBUG
> +        bool "ATA debugging"
> +        help
> +          This is an option for use by developers; most people should
> +          say N here.  This enables ATA core and driver debugging.
> +
> +config ATA_VDEBUG
> +        bool "ATA verbose debugging"
> +        depends on ATA_DEBUG
> +        help
> +          This is an option for use by developers; most people should
> +          say N here.  This enables deeper (more verbose) debugging of
> +          the ATA core and drivers.
> +

There does not seem to be a large, driving need for this.  It is 
straightforward to update the header file for the esoteric, voluminous 
debugging.

If you are missing critical hardware or software errors, that is an 
argument that those error messages should be outside of DEBUG/VDEBUG, 
shipped with every kernel.

	Jeff



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh KUMAR - July 26, 2011, 3:53 a.m.
Hi Jeff,

On 07/24/2011 03:47 AM, Jeff Garzik wrote:
>> > +config ATA_DEBUG
>> > +        bool "ATA debugging"
>> > +        help
>> > +          This is an option for use by developers; most people should
>> > +          say N here.  This enables ATA core and driver debugging.
>> > +
>> > +config ATA_VDEBUG
>> > +        bool "ATA verbose debugging"
>> > +        depends on ATA_DEBUG
>> > +        help
>> > +          This is an option for use by developers; most people should
>> > +          say N here.  This enables deeper (more verbose) debugging of
>> > +          the ATA core and drivers.
>> > +
> There does not seem to be a large, driving need for this.  It is 
> straightforward to update the header file for the esoteric, voluminous 
> debugging.
> 

When i was debugging my code earlier, i found this more useful and
convenient over editing headers. We may need to do this in several
header files, if we don't have common header for two source files.
Also, having this as config option would be more helpful for people
who don't have much knowhow of "how dev_dbg and dev_vdbg works".

> If you are missing critical hardware or software errors, that is an 
> argument that those error messages should be outside of DEBUG/VDEBUG, 
> shipped with every kernel.

That's not my case. I wanted to print debug info.

Patch

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 5dd1e4c..e1ac908 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -22,6 +22,20 @@  menuconfig ATA
 
 if ATA
 
+config ATA_DEBUG
+        bool "ATA debugging"
+        help
+          This is an option for use by developers; most people should
+          say N here.  This enables ATA core and driver debugging.
+
+config ATA_VDEBUG
+        bool "ATA verbose debugging"
+        depends on ATA_DEBUG
+        help
+          This is an option for use by developers; most people should
+          say N here.  This enables deeper (more verbose) debugging of
+          the ATA core and drivers.
+
 config ATA_NONSTANDARD
        bool
        default n
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 0da42cb..6dfaeb9 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,3 +1,5 @@ 
+ccflags-$(CONFIG_ATA_DEBUG)  := -DDEBUG
+ccflags-$(CONFIG_ATA_VDEBUG) += -DVERBOSE_DEBUG
 
 obj-$(CONFIG_ATA)		+= libata.o