diff options
| -rw-r--r-- | sys/dev/pccard/pccard.c | 16 | ||||
| -rw-r--r-- | sys/dev/pccard/pccard_cis.c | 7 |
2 files changed, 19 insertions, 4 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 610ce4cbe388..d710eb84aa17 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -36,6 +36,7 @@ #include <sys/module.h> #include <sys/kernel.h> #include <sys/queue.h> +#include <sys/sysctl.h> #include <sys/types.h> #include <sys/bus.h> @@ -53,8 +54,21 @@ #define PCCARDDEBUG -#ifdef PCCARDDEBUG +/* sysctl vars */ +SYSCTL_NODE(_hw, OID_AUTO, pccard, CTLFLAG_RD, 0, "PCCARD parameters"); + int pccard_debug = 0; +TUNABLE_INT("hw.pccard.debug", &pccard_debug); +SYSCTL_INT(_hw_pccard, OID_AUTO, debug, CTLFLAG_RW, + &pccard_debug, 0, + "pccard debug"); + +int pccard_cis_debug = 0; +TUNABLE_INT("hw.pccard.cis_debug", &pccard_cis_debug); +SYSCTL_INT(_hw_pccard, OID_AUTO, cis_debug, CTLFLAG_RW, + &pccard_cis_debug, 0, "pccard CIS debug"); + +#ifdef PCCARDDEBUG #define DPRINTF(arg) if (pccard_debug) printf arg #define DEVPRINTF(arg) if (pccard_debug) device_printf arg #define PRVERBOSE(arg) printf arg diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 9690ba47fbf2..294aa89ef33b 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -48,11 +48,12 @@ #include "card_if.h" +extern int pccard_cis_debug; + #define PCCARDCISDEBUG #ifdef PCCARDCISDEBUG -int pccardcis_debug = 0; -#define DPRINTF(arg) if (pccardcis_debug) printf arg -#define DEVPRINTF(arg) if (pccardcis_debug) device_printf arg +#define DPRINTF(arg) if (pccard_cis_debug) printf arg +#define DEVPRINTF(arg) if (pccard_cis_debug) device_printf arg #else #define DPRINTF(arg) #define DEVPRINTF(arg) |
