Subject: Moving ATADEBUG to kernel config file ?
To: None <>
From: Arnaud Lacombe <>
List: tech-kern
Date: 03/28/2006 01:56:36

During the last month I debugged things related to ATA and wdc drivers
(not bug, but just to understand how they were working). I noticed that
ATADEBUG macro was defined in 6 different files and always turned on.
Undefining this macro causes the compilation to fails.

Wouldn't it be better to define this macro in only one place (ie. the
kernel config file) ?

BTW, I also noticed that there are a lot of sub-option which
enable/disable, change the behaviour of debug output (such as
atadebug_mask and wdcdebug_wd_mask, but also pcmcia_verbose,
pcmciacis_debug ...). Unless error of my part, there is no easy access
interface for enabling/disabling them from userland without breaking
into DDB or change it at compilation time.
FreeBSD uses sysctls to (de)activate them. I think that it could be a
solution, but I don't really know where to place them in the sysctl tree
as the debug subtree seems to be retained for backwards compatibility

any comments/suggestions ?