diff options
author | imp <imp@FreeBSD.org> | 2002-03-07 08:03:53 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-03-07 08:03:53 +0000 |
commit | 03b0ddafe21bf030535b665c826844d350ebf0a4 (patch) | |
tree | 11c07c3606957cd54d4ddfde1d94b1c7983af6b5 | |
parent | b5d91caf1c221fd725f5fb8a023e621ec2932b80 (diff) | |
download | FreeBSD-src-03b0ddafe21bf030535b665c826844d350ebf0a4.zip FreeBSD-src-03b0ddafe21bf030535b665c826844d350ebf0a4.tar.gz |
Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.
-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 610ce4c..d710eb8 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 9690ba4..294aa89 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) |