Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1

will enable more verbose debugging output from the pccard system.
This commit is contained in:
imp 2002-03-07 08:03:53 +00:00
parent 7ac5f4ffb2
commit 12505aaa99
2 changed files with 19 additions and 4 deletions

View File

@ -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

View File

@ -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)