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 #include #include +#include #include #include @@ -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)