summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-11-22 21:21:22 +0000
committerthompsa <thompsa@FreeBSD.org>2009-11-22 21:21:22 +0000
commit76c322aad5bf9b07d9f924b436d7d6753be34426 (patch)
treea9534a7551ff9a80078d47dd35ea2a99a024f139 /sys/dev/usb
parent5cc1375c31a20e69a7c4df470b5e141a00b53620 (diff)
downloadFreeBSD-src-76c322aad5bf9b07d9f924b436d7d6753be34426.zip
FreeBSD-src-76c322aad5bf9b07d9f924b436d7d6753be34426.tar.gz
Provide tunables for some of the usb sysctls that affect boot behaviour.
Submitted by: Andriy Gapon
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/controller/ehci.c3
-rw-r--r--sys/dev/usb/controller/ohci.c3
-rw-r--r--sys/dev/usb/controller/uhci.c4
-rw-r--r--sys/dev/usb/input/ukbd.c2
-rw-r--r--sys/dev/usb/storage/umass.c2
-rw-r--r--sys/dev/usb/usb_debug.c2
-rw-r--r--sys/dev/usb/usb_dev.c2
-rw-r--r--sys/dev/usb/usb_generic.c2
-rw-r--r--sys/dev/usb/usb_hub.c2
-rw-r--r--sys/dev/usb/usb_process.c2
10 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index d665b89..69507b0 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -99,6 +99,9 @@ SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RW,
SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RW,
&ehcinohighspeed, 0, "Disable High Speed USB");
+TUNABLE_INT("hw.usb.ehci.debug", &ehcidebug);
+TUNABLE_INT("hw.usb.ehci.no_hs", &ehcinohighspeed);
+
static void ehci_dump_regs(ehci_softc_t *sc);
static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh);
diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c
index 637b639..fa7f23a 100644
--- a/sys/dev/usb/controller/ohci.c
+++ b/sys/dev/usb/controller/ohci.c
@@ -84,6 +84,9 @@ static int ohcidebug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci");
SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RW,
&ohcidebug, 0, "ohci debug level");
+
+TUNABLE_INT("hw.usb.ohci.debug", &ohcidebug);
+
static void ohci_dumpregs(ohci_softc_t *);
static void ohci_dump_tds(ohci_td_t *);
static uint8_t ohci_dump_td(ohci_td_t *);
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c
index 4e2659c..918855b 100644
--- a/sys/dev/usb/controller/uhci.c
+++ b/sys/dev/usb/controller/uhci.c
@@ -91,6 +91,10 @@ SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RW,
&uhcidebug, 0, "uhci debug level");
SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RW,
&uhcinoloop, 0, "uhci noloop");
+
+TUNABLE_INT("hw.usb.uhci.debug", &uhcidebug);
+TUNABLE_INT("hw.usb.uhci.loop", &uhcinoloop);
+
static void uhci_dumpregs(uhci_softc_t *sc);
static void uhci_dump_tds(uhci_td_t *td);
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 26ed8bc..a419f95 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -105,6 +105,8 @@ SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RW,
SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RW,
&ukbd_no_leds, 0, "Disables setting of keyboard leds");
+TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_debug);
+TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds);
#endif
#define UPROTO_BOOT_KEYBOARD 1
diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
index 18756c9..f2430dc 100644
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -175,6 +175,8 @@ static int umass_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass");
SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW,
&umass_debug, 0, "umass debug level");
+
+TUNABLE_INT("hw.usb.umass.debug", &umass_debug);
#else
#define DIF(...) do { } while (0)
#define DPRINTF(...) do { } while (0)
diff --git a/sys/dev/usb/usb_debug.c b/sys/dev/usb/usb_debug.c
index 7f1e4e9..64c3a08 100644
--- a/sys/dev/usb/usb_debug.c
+++ b/sys/dev/usb/usb_debug.c
@@ -67,6 +67,8 @@ SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging");
SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RW,
&usb_debug, 0, "Debug level");
+TUNABLE_INT("hw.usb.debug", &usb_debug);
+
/*------------------------------------------------------------------------*
* usb_dump_iface
*
diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c
index c828b24..6361533 100644
--- a/sys/dev/usb/usb_dev.c
+++ b/sys/dev/usb/usb_dev.c
@@ -85,6 +85,8 @@ static int usb_fifo_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, dev, CTLFLAG_RW, 0, "USB device");
SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RW,
&usb_fifo_debug, 0, "Debug Level");
+
+TUNABLE_INT("hw.usb.dev.debug", &usb_fifo_debug);
#endif
#if ((__FreeBSD_version >= 700001) || (__FreeBSD_version == 0) || \
diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c
index 5990cd5..9fc0cc7 100644
--- a/sys/dev/usb/usb_generic.c
+++ b/sys/dev/usb/usb_generic.c
@@ -130,6 +130,8 @@ static int ugen_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB generic");
SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW, &ugen_debug,
0, "Debug level");
+
+TUNABLE_INT("hw.usb.ugen.debug", &ugen_debug);
#endif
diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c
index 0809086..a116ab4 100644
--- a/sys/dev/usb/usb_hub.c
+++ b/sys/dev/usb/usb_hub.c
@@ -79,6 +79,8 @@ static int uhub_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB HUB");
SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug, CTLFLAG_RW, &uhub_debug, 0,
"Debug level");
+
+TUNABLE_INT("hw.usb.uhub.debug", &uhub_debug);
#endif
#if USB_HAVE_POWERD
diff --git a/sys/dev/usb/usb_process.c b/sys/dev/usb/usb_process.c
index eb503fd..5b4b749 100644
--- a/sys/dev/usb/usb_process.c
+++ b/sys/dev/usb/usb_process.c
@@ -83,6 +83,8 @@ static int usb_proc_debug;
SYSCTL_NODE(_hw_usb, OID_AUTO, proc, CTLFLAG_RW, 0, "USB process");
SYSCTL_INT(_hw_usb_proc, OID_AUTO, debug, CTLFLAG_RW, &usb_proc_debug, 0,
"Debug level");
+
+TUNABLE_INT("hw.usb.proc.debug", &usb_proc_debug);
#endif
/*------------------------------------------------------------------------*
OpenPOWER on IntegriCloud