summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-03-07 18:39:03 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-03-07 18:39:03 +0000
commit063defb1c68638789fc3466451766529c2c5f754 (patch)
tree9d50cc9fc419483bb1ee5c897adb48d483ca672f /sys/dev/usb
parentae7dfe87886f2abbc46f5b44b71e097b7e18d8b9 (diff)
Do not define per-driver DEBUG variable when USB_DEBUG is defined. It's
really impossible to debug the USB stack when any single device you plug in your machine starts to vomit its own poetry,
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_atu.c6
-rw-r--r--sys/dev/usb/if_otus.c6
-rw-r--r--sys/dev/usb/if_ral.c6
-rw-r--r--sys/dev/usb/if_rsu.c6
-rw-r--r--sys/dev/usb/if_rum.c6
-rw-r--r--sys/dev/usb/if_run.c6
-rw-r--r--sys/dev/usb/if_smsc.c9
-rw-r--r--sys/dev/usb/if_uath.c6
-rw-r--r--sys/dev/usb/if_urtw.c6
-rw-r--r--sys/dev/usb/if_urtwn.c6
-rw-r--r--sys/dev/usb/if_zyd.c6
-rw-r--r--sys/dev/usb/ubsa.c6
-rw-r--r--sys/dev/usb/umsm.c6
-rw-r--r--sys/dev/usb/uoaklux.c6
-rw-r--r--sys/dev/usb/uoakrh.c6
-rw-r--r--sys/dev/usb/uoakv.c6
-rw-r--r--sys/dev/usb/usps.c6
-rw-r--r--sys/dev/usb/uthum.c6
-rw-r--r--sys/dev/usb/uticom.c7
-rw-r--r--sys/dev/usb/utrh.c6
-rw-r--r--sys/dev/usb/uts.c6
-rw-r--r--sys/dev/usb/utwitch.c6
22 files changed, 26 insertions, 110 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index d8ead0cc0d7..e5a698ab4d0 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.104 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: if_atu.c,v 1.105 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -82,10 +82,6 @@
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_radiotap.h>
-#ifdef USB_DEBUG
-#define ATU_DEBUG
-#endif
-
#include <dev/usb/if_atureg.h>
#ifdef ATU_DEBUG
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index 3cc784e99a2..7075713a3c0 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.37 2013/11/26 20:33:18 deraadt Exp $ */
+/* $OpenBSD: if_otus.c,v 1.38 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -61,10 +61,6 @@
#include <dev/usb/if_otusreg.h>
-#ifdef USB_DEBUG
-#define OTUS_DEBUG
-#endif
-
#ifdef OTUS_DEBUG
#define DPRINTF(x) do { if (otus_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (otus_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 560f78b9f83..ac663f7e947 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.124 2013/08/07 01:06:42 bluhm Exp $ */
+/* $OpenBSD: if_ral.c,v 1.125 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -64,10 +64,6 @@
#include <dev/usb/if_ralreg.h>
#include <dev/usb/if_ralvar.h>
-#ifdef USB_DEBUG
-#define URAL_DEBUG
-#endif
-
#ifdef URAL_DEBUG
#define DPRINTF(x) do { if (ural_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (ural_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_rsu.c b/sys/dev/usb/if_rsu.c
index b79e1d5d652..c5bf2c1d3d8 100644
--- a/sys/dev/usb/if_rsu.c
+++ b/sys/dev/usb/if_rsu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rsu.c,v 1.18 2013/08/07 01:06:42 bluhm Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.19 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -60,10 +60,6 @@
#include <dev/usb/if_rsureg.h>
-#ifdef USB_DEBUG
-#define RSU_DEBUG
-#endif
-
#ifdef RSU_DEBUG
#define DPRINTF(x) do { if (rsu_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (rsu_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 446287a8969..548b23aa372 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.101 2013/08/07 01:06:42 bluhm Exp $ */
+/* $OpenBSD: if_rum.c,v 1.102 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -64,10 +64,6 @@
#include <dev/usb/if_rumreg.h>
#include <dev/usb/if_rumvar.h>
-#ifdef USB_DEBUG
-#define RUM_DEBUG
-#endif
-
#ifdef RUM_DEBUG
#define DPRINTF(x) do { if (rum_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (rum_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index caf9920d3bb..214cf12d630 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.95 2013/09/30 05:18:56 jsg Exp $ */
+/* $OpenBSD: if_run.c,v 1.96 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -63,10 +63,6 @@
#include <dev/ic/rt2860reg.h> /* shared with ral(4) */
#include <dev/usb/if_runvar.h>
-#ifdef USB_DEBUG
-#define RUN_DEBUG
-#endif
-
#ifdef RUN_DEBUG
#define DPRINTF(x) do { if (run_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (run_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c
index 30e8abec6a3..2467e3ec6f4 100644
--- a/sys/dev/usb/if_smsc.c
+++ b/sys/dev/usb/if_smsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_smsc.c,v 1.10 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: if_smsc.c,v 1.11 2014/03/07 18:39:02 mpi Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
/*-
* Copyright (c) 2012
@@ -99,10 +99,6 @@
#include "if_smscreg.h"
-#ifdef USB_DEBUG
-static int smsc_debug = 0;
-#endif
-
/*
* Various supported device vendors/products.
*/
@@ -127,7 +123,8 @@ static const struct usb_devno smsc_devs[] = {
{ USB_VENDOR_SMC2, USB_PRODUCT_SMC2_SMSC9512_14_SAL10 }
};
-#ifdef USB_DEBUG
+#ifdef SMSC_DEBUG
+static int smsc_debug = 0;
#define smsc_dbg_printf(sc, fmt, args...) \
do { \
if (smsc_debug > 0) \
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 9bc2b557b67..ec6852209d2 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.56 2013/08/07 01:06:42 bluhm Exp $ */
+/* $OpenBSD: if_uath.c,v 1.57 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2006
@@ -71,10 +71,6 @@
#include <dev/usb/if_uathreg.h>
#include <dev/usb/if_uathvar.h>
-#ifdef USB_DEBUG
-#define UATH_DEBUG
-#endif
-
#ifdef UATH_DEBUG
#define DPRINTF(x) do { if (uath_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (uath_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index 922dfdadc26..1bc4c5c1114 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.43 2013/08/07 01:06:43 bluhm Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.44 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -56,10 +56,6 @@
#include <dev/usb/if_urtwreg.h>
-#ifdef USB_DEBUG
-#define URTW_DEBUG
-#endif
-
#ifdef URTW_DEBUG
#define DPRINTF(x) do { if (urtw_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (urtw_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index d1990ad46cb..79bf9cdd2d7 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.32 2013/09/30 05:18:57 jsg Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.33 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -60,10 +60,6 @@
#include <dev/usb/if_urtwnreg.h>
-#ifdef USB_DEBUG
-#define URTWN_DEBUG
-#endif
-
#ifdef URTWN_DEBUG
#define DPRINTF(x) do { if (urtwn_debug) printf x; } while (0)
#define DPRINTFN(n, x) do { if (urtwn_debug >= (n)) printf x; } while (0)
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index c6bbda646b8..e75c2670526 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.95 2014/02/15 02:20:29 jsg Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.96 2014/03/07 18:39:02 mpi Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -64,10 +64,6 @@
#include <dev/usb/if_zydreg.h>
-#ifdef USB_DEBUG
-#define ZYD_DEBUG
-#endif
-
#ifdef ZYD_DEBUG
#define DPRINTF(x) do { if (zyddebug > 0) printf x; } while (0)
#define DPRINTFN(n, x) do { if (zyddebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index 9d543a2f589..a071565b264 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsa.c,v 1.60 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: ubsa.c,v 1.61 2014/03/07 18:39:02 mpi Exp $ */
/* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@@ -77,10 +77,6 @@
#include <dev/usb/ucomvar.h>
-#ifdef USB_DEBUG
-#define UBSA_DEBUG
-#endif
-
#ifdef UBSA_DEBUG
int ubsadebug = 0;
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c
index 319617e8cc7..5eb138f7142 100644
--- a/sys/dev/usb/umsm.c
+++ b/sys/dev/usb/umsm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umsm.c,v 1.96 2013/12/13 17:43:07 yuo Exp $ */
+/* $OpenBSD: umsm.c,v 1.97 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2008 Yojiro UO <yuo@nui.org>
@@ -36,10 +36,6 @@
#include <dev/usb/umassvar.h>
#undef DPRINTF /* undef DPRINTF for umass */
-#ifdef USB_DEBUG
-#define UMSM_DEBUG
-#endif
-
#ifdef UMSM_DEBUG
int umsmdebug = 0;
#define DPRINTFN(n, x) do { if (umsmdebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/uoaklux.c b/sys/dev/usb/uoaklux.c
index 990f230f4c0..148191fa2c9 100644
--- a/sys/dev/usb/uoaklux.c
+++ b/sys/dev/usb/uoaklux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoaklux.c,v 1.5 2013/11/11 09:16:03 pirofti Exp $ */
+/* $OpenBSD: uoaklux.c,v 1.6 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -36,10 +36,6 @@
#include <dev/usb/hid.h>
#include "uoak.h"
-#ifdef USB_DEBUG
-#define UOAKLUX_DEBUG
-#endif
-
#ifdef UOAKLUX_DEBUG
int uoakluxdebug = 0;
#define DPRINTFN(n, x) do { if (uoakluxdebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/uoakrh.c b/sys/dev/usb/uoakrh.c
index bd29ba1ab3d..facca70b206 100644
--- a/sys/dev/usb/uoakrh.c
+++ b/sys/dev/usb/uoakrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoakrh.c,v 1.6 2013/11/11 09:16:03 pirofti Exp $ */
+/* $OpenBSD: uoakrh.c,v 1.7 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -36,10 +36,6 @@
#include <dev/usb/hid.h>
#include "uoak.h"
-#ifdef USB_DEBUG
-#define OARKRH_DEBUG
-#endif
-
#ifdef OARKRH_DEBUG
int uoakrhdebug = 0;
#define DPRINTFN(n, x) do { if (uoakrhdebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/uoakv.c b/sys/dev/usb/uoakv.c
index 93243a2aab0..d2a5b208a87 100644
--- a/sys/dev/usb/uoakv.c
+++ b/sys/dev/usb/uoakv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoakv.c,v 1.5 2013/11/11 09:16:03 pirofti Exp $ */
+/* $OpenBSD: uoakv.c,v 1.6 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -36,10 +36,6 @@
#include <dev/usb/hid.h>
#include "uoak.h"
-#ifdef USB_DEBUG
-#define UOAKV_DEBUG
-#endif
-
#ifdef UOAKV_DEBUG
int uoakvdebug = 0;
#define DPRINTFN(n, x) do { if (uoakvdebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/usps.c b/sys/dev/usb/usps.c
index c3d92863621..9b947371183 100644
--- a/sys/dev/usb/usps.c
+++ b/sys/dev/usb/usps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usps.c,v 1.4 2013/11/07 10:44:37 pirofti Exp $ */
+/* $OpenBSD: usps.c,v 1.5 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2011 Yojiro UO <yuo@nui.org>
@@ -31,10 +31,6 @@
#include <dev/usb/usbdi_util.h>
#include <dev/usb/usbdevs.h>
-#ifdef USB_DEBUG
-#define USPS_DEBUG
-#endif
-
#ifdef USPS_DEBUG
int uspsdebug = 0;
#define DPRINTFN(n, x) do { if (uspsdebug > (n)) printf x; } while (0)
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c
index b6f18864bee..16ebf725dea 100644
--- a/sys/dev/usb/uthum.c
+++ b/sys/dev/usb/uthum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthum.c,v 1.24 2013/09/28 11:22:09 sasano Exp $ */
+/* $OpenBSD: uthum.c,v 1.25 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2009, 2010 Yojiro UO <yuo@nui.org>
@@ -34,10 +34,6 @@
#include <dev/usb/uhidev.h>
#include <dev/usb/hid.h>
-#ifdef USB_DEBUG
-#define UTHUM_DEBUG
-#endif
-
#ifdef UTHUM_DEBUG
#define DPRINTF(x) do { printf x; } while (0)
#else
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c
index eeb649afff1..2ddd7718724 100644
--- a/sys/dev/usb/uticom.c
+++ b/sys/dev/usb/uticom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uticom.c,v 1.23 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: uticom.c,v 1.24 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>.
*
@@ -45,9 +45,8 @@
#include <dev/usb/ucomvar.h>
-#ifdef USB_DEBUG
-static int uticomdebug = 0;
-
+#ifdef UTICOM_DEBUG
+static int uticomdebug = 0;
#define DPRINTFN(n, x) do { if (uticomdebug > (n)) printf x; } while (0)
#else
#define DPRINTFN(n, x)
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c
index 5b6ccb5466b..0ba3cfd82ea 100644
--- a/sys/dev/usb/utrh.c
+++ b/sys/dev/usb/utrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utrh.c,v 1.11 2013/08/17 08:34:45 sthen Exp $ */
+/* $OpenBSD: utrh.c,v 1.12 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
@@ -34,10 +34,6 @@
#include <dev/usb/uhidev.h>
#include <dev/usb/hid.h>
-#ifdef USB_DEBUG
-#define UTRH_DEBUG
-#endif
-
#ifdef UTRH_DEBUG
#define DPRINTF(x) do { printf x; } while (0)
#else
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index 7b2c2efa0fe..4c1fd0fc20f 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.32 2013/11/07 10:33:43 pirofti Exp $ */
+/* $OpenBSD: uts.c,v 1.33 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -39,10 +39,6 @@
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsmousevar.h>
-#ifdef USB_DEBUG
-#define UTS_DEBUG
-#endif
-
#ifdef UTS_DEBUG
#define DPRINTF(x) do { printf x; } while (0)
#else
diff --git a/sys/dev/usb/utwitch.c b/sys/dev/usb/utwitch.c
index 1fe7dc4794a..6045f1ef28a 100644
--- a/sys/dev/usb/utwitch.c
+++ b/sys/dev/usb/utwitch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utwitch.c,v 1.8 2013/08/17 08:34:45 sthen Exp $ */
+/* $OpenBSD: utwitch.c,v 1.9 2014/03/07 18:39:02 mpi Exp $ */
/*
* Copyright (c) 2010 Yojiro UO <yuo@nui.org>
@@ -35,10 +35,6 @@
#include <dev/usb/uhidev.h>
#include <dev/usb/hid.h>
-#ifdef USB_DEBUG
-#define UYUREX_DEBUG
-#endif
-
#define CMD_NONE 0xf0
#define CMD_EOF 0x0d
#define CMD_ACK 0x21