diff options
author | joe <joe@FreeBSD.org> | 2002-07-31 13:33:55 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-07-31 13:33:55 +0000 |
commit | 03e965b480798ffb5a2740bb8c871c70054ced82 (patch) | |
tree | dd95364f776cb0c0e54f022e48c5e8db7f52c692 /sys/dev/usb/usb.c | |
parent | db2b5421c21286b0bc2dc446ebf11eb4912f480e (diff) | |
download | FreeBSD-src-03e965b480798ffb5a2740bb8c871c70054ced82.zip FreeBSD-src-03e965b480798ffb5a2740bb8c871c70054ced82.tar.gz |
Get bored with hard coded debug level variables and introduce a debug.usb
sysctl tree for tweaking them real-time.
Reviewed by: iedowse
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r-- | sys/dev/usb/usb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 6320801..e455cee 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -70,6 +70,7 @@ #endif #include <sys/vnode.h> #include <sys/signalvar.h> +#include <sys/sysctl.h> #include <dev/usb/usb.h> #include <dev/usb/usbdi.h> @@ -91,10 +92,17 @@ MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller"); #include <dev/usb/usbdivar.h> #include <dev/usb/usb_quirks.h> +/* Define this unconditionally in case a kernel module is loaded that + * has been compiled with debugging options. + */ +SYSCTL_NODE(_debug, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging"); + #ifdef USB_DEBUG #define DPRINTF(x) if (usbdebug) logprintf x #define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x int usbdebug = 0; +SYSCTL_INT(_debug_usb, OID_AUTO, usb, CTLFLAG_RW, + &usbdebug, 0, "usb debug level"); #ifdef UHCI_DEBUG extern int uhcidebug; #endif |