summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ums.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-04-11 20:50:33 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-04-11 20:50:33 +0000
commit94f89925adaf485e8c44ea5051caca0d5144810a (patch)
tree6daf4c342ff3a4576dd2894fcdc7c087ff58208f /sys/dev/usb/ums.c
parentd844f4559093125d735a5de22713c447117cf696 (diff)
downloadFreeBSD-src-94f89925adaf485e8c44ea5051caca0d5144810a.zip
FreeBSD-src-94f89925adaf485e8c44ea5051caca0d5144810a.tar.gz
1) Make debugging more selective.
2) create function usbd_errstr which turns a usbd_status into a sensible error message 3) Change the printf in DPRINTF to logprintf which is a define for log(KERN_DEBUG, x)
Diffstat (limited to 'sys/dev/usb/ums.c')
-rw-r--r--sys/dev/usb/ums.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index ca8a991..9464566 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -74,9 +74,9 @@
#include <machine/mouse.h>
#endif
-#ifdef USB_DEBUG
-#define DPRINTF(x) if (umsdebug) printf x
-#define DPRINTFN(n,x) if (umsdebug>(n)) printf x
+#ifdef UMS_DEBUG
+#define DPRINTF(x) if (umsdebug) logprintf x
+#define DPRINTFN(n,x) if (umsdebug>(n)) logprintf x
int umsdebug = 1;
#else
#define DPRINTF(x)
@@ -307,7 +307,7 @@ USB_ATTACH(ums)
sc->sc_disconnected = 0;
free(desc, M_TEMP);
-#ifdef USB_DEBUG
+#ifdef UMS_DEBUG
DPRINTF(("ums_attach: sc=%p\n", sc));
DPRINTF(("ums_attach: X\t%d/%d\n",
sc->sc_loc_x.pos, sc->sc_loc_x.size));
@@ -495,7 +495,7 @@ ums_intr(reqh, addr, status)
sc->qhead += sc->mode.packetsize;
sc->qcount += sc->mode.packetsize;
-#ifdef USB_DEBUG
+#ifdef UMS_DEBUG
if (sc->qhead > sizeof(sc->qbuf))
DPRINTF(("Buffer overrun! %d %d\n",
sc->qhead, sizeof(sc->qbuf)));
@@ -566,7 +566,7 @@ ums_disable(v)
sc->sc_enabled = 0;
-#if defined(USBVERBOSE) && defined(__FreeBSD__)
+#if defined(__FreeBSD__)
if (sc->qcount != 0)
DPRINTF(("Discarded %d bytes in queue\n", sc->qcount));
#endif
OpenPOWER on IntegriCloud