diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-04-11 20:50:33 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-04-11 20:50:33 +0000 |
commit | 94f89925adaf485e8c44ea5051caca0d5144810a (patch) | |
tree | 6daf4c342ff3a4576dd2894fcdc7c087ff58208f /sys/dev/usb/ums.c | |
parent | d844f4559093125d735a5de22713c447117cf696 (diff) | |
download | FreeBSD-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.c | 12 |
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 |