summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/Makefile2
-rw-r--r--drivers/usb/host/ehci-dbg.c8
-rw-r--r--drivers/usb/host/ehci-fsl.c2
-rw-r--r--drivers/usb/host/ehci-hcd.c6
-rw-r--r--drivers/usb/host/ehci-q.c4
-rw-r--r--drivers/usb/host/ehci.h8
-rw-r--r--drivers/usb/host/imx21-dbg.c4
-rw-r--r--drivers/usb/host/imx21-hcd.c4
-rw-r--r--drivers/usb/host/imx21-hcd.h4
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c4
-rw-r--r--drivers/usb/host/uhci-debug.c4
-rw-r--r--drivers/usb/host/uhci-hcd.c6
12 files changed, 35 insertions, 21 deletions
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 01e879ef3654..7530468c9a4f 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -2,8 +2,6 @@
2# Makefile for USB Host Controller Drivers 2# Makefile for USB Host Controller Drivers
3# 3#
4 4
5ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
6
7# tell define_trace.h where to find the xhci trace header 5# tell define_trace.h where to find the xhci trace header
8CFLAGS_xhci-trace.o := -I$(src) 6CFLAGS_xhci-trace.o := -I$(src)
9 7
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 4a9c2edbcb2b..9269782a7627 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -18,7 +18,7 @@
18 18
19/* this file is part of ehci-hcd.c */ 19/* this file is part of ehci-hcd.c */
20 20
21#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 21#ifdef CONFIG_DYNAMIC_DEBUG
22 22
23/* check the values in the HCSPARAMS register 23/* check the values in the HCSPARAMS register
24 * (host controller _Structural_ parameters) 24 * (host controller _Structural_ parameters)
@@ -62,7 +62,7 @@ static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {}
62 62
63#endif 63#endif
64 64
65#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 65#ifdef CONFIG_DYNAMIC_DEBUG
66 66
67/* check the values in the HCCPARAMS register 67/* check the values in the HCCPARAMS register
68 * (host controller _Capability_ parameters) 68 * (host controller _Capability_ parameters)
@@ -101,7 +101,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {}
101 101
102#endif 102#endif
103 103
104#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 104#ifdef CONFIG_DYNAMIC_DEBUG
105 105
106static void __maybe_unused 106static void __maybe_unused
107dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) 107dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
@@ -301,7 +301,7 @@ static inline int __maybe_unused
301dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) 301dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
302{ return 0; } 302{ return 0; }
303 303
304#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 304#endif /* CONFIG_DYNAMIC_DEBUG */
305 305
306/* functions have the "wrong" filename when they're output... */ 306/* functions have the "wrong" filename when they're output... */
307#define dbg_status(ehci, label, status) { \ 307#define dbg_status(ehci, label, status) { \
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index a06d5012201f..87a7426a44f4 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -413,7 +413,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
413 struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); 413 struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
414 u32 tmp; 414 u32 tmp;
415 415
416#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 416#ifdef CONFIG_DYNAMIC_DEBUG
417 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); 417 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE);
418 mode &= USBMODE_CM_MASK; 418 mode &= USBMODE_CM_MASK;
419 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */ 419 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b57e997eb716..1e21a3623af9 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1313,7 +1313,7 @@ static int __init ehci_hcd_init(void)
1313 sizeof(struct ehci_qh), sizeof(struct ehci_qtd), 1313 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
1314 sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); 1314 sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
1315 1315
1316#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1316#ifdef CONFIG_DYNAMIC_DEBUG
1317 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); 1317 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root);
1318 if (!ehci_debug_root) { 1318 if (!ehci_debug_root) {
1319 retval = -ENOENT; 1319 retval = -ENOENT;
@@ -1362,7 +1362,7 @@ clean2:
1362 platform_driver_unregister(&PLATFORM_DRIVER); 1362 platform_driver_unregister(&PLATFORM_DRIVER);
1363clean0: 1363clean0:
1364#endif 1364#endif
1365#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1365#ifdef CONFIG_DYNAMIC_DEBUG
1366 debugfs_remove(ehci_debug_root); 1366 debugfs_remove(ehci_debug_root);
1367 ehci_debug_root = NULL; 1367 ehci_debug_root = NULL;
1368err_debug: 1368err_debug:
@@ -1386,7 +1386,7 @@ static void __exit ehci_hcd_cleanup(void)
1386#ifdef PS3_SYSTEM_BUS_DRIVER 1386#ifdef PS3_SYSTEM_BUS_DRIVER
1387 ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1387 ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
1388#endif 1388#endif
1389#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1389#ifdef CONFIG_DYNAMIC_DEBUG
1390 debugfs_remove(ehci_debug_root); 1390 debugfs_remove(ehci_debug_root);
1391#endif 1391#endif
1392 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 1392 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index db05bd8ee9d5..54f5332f814d 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -168,13 +168,13 @@ static void ehci_clear_tt_buffer(struct ehci_hcd *ehci, struct ehci_qh *qh,
168 * Note: this routine is never called for Isochronous transfers. 168 * Note: this routine is never called for Isochronous transfers.
169 */ 169 */
170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { 170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
171#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 171#ifdef CONFIG_DYNAMIC_DEBUG
172 struct usb_device *tt = urb->dev->tt->hub; 172 struct usb_device *tt = urb->dev->tt->hub;
173 dev_dbg(&tt->dev, 173 dev_dbg(&tt->dev,
174 "clear tt buffer port %d, a%d ep%d t%08x\n", 174 "clear tt buffer port %d, a%d ep%d t%08x\n",
175 urb->dev->ttport, urb->dev->devnum, 175 urb->dev->ttport, urb->dev->devnum,
176 usb_pipeendpoint(urb->pipe), token); 176 usb_pipeendpoint(urb->pipe), token);
177#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 177#endif /* CONFIG_DYNAMIC_DEBUG */
178 if (!ehci_is_TDI(ehci) 178 if (!ehci_is_TDI(ehci)
179 || urb->dev->tt->hub != 179 || urb->dev->tt->hub !=
180 ehci_to_hcd(ehci)->self.root_hub) { 180 ehci_to_hcd(ehci)->self.root_hub) {
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index e8f41c5e771b..c35a6e2b94e5 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -38,7 +38,7 @@ typedef __u16 __bitwise __hc16;
38#endif 38#endif
39 39
40/* statistics can be kept for tuning/monitoring */ 40/* statistics can be kept for tuning/monitoring */
41#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 41#ifdef CONFIG_DYNAMIC_DEBUG
42#define EHCI_STATS 42#define EHCI_STATS
43#endif 43#endif
44 44
@@ -248,7 +248,7 @@ struct ehci_hcd { /* one per controller */
248#endif 248#endif
249 249
250 /* debug files */ 250 /* debug files */
251#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 251#ifdef CONFIG_DYNAMIC_DEBUG
252 struct dentry *debug_dir; 252 struct dentry *debug_dir;
253#endif 253#endif
254 254
@@ -832,9 +832,9 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
832 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args) 832 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
833 833
834 834
835#if !defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG) 835#ifndef CONFIG_DYNAMIC_DEBUG
836#define STUB_DEBUG_FILES 836#define STUB_DEBUG_FILES
837#endif /* !DEBUG && !CONFIG_DYNAMIC_DEBUG */ 837#endif
838 838
839/*-------------------------------------------------------------------------*/ 839/*-------------------------------------------------------------------------*/
840 840
diff --git a/drivers/usb/host/imx21-dbg.c b/drivers/usb/host/imx21-dbg.c
index ec98ecee3517..4f320d050da7 100644
--- a/drivers/usb/host/imx21-dbg.c
+++ b/drivers/usb/host/imx21-dbg.c
@@ -18,6 +18,10 @@
18 18
19/* this file is part of imx21-hcd.c */ 19/* this file is part of imx21-hcd.c */
20 20
21#ifdef CONFIG_DYNAMIC_DEBUG
22#define DEBUG
23#endif
24
21#ifndef DEBUG 25#ifndef DEBUG
22 26
23static inline void create_debug_files(struct imx21 *imx21) { } 27static inline void create_debug_files(struct imx21 *imx21) { }
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index adb01d950a16..cb6d60853502 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -62,6 +62,10 @@
62 62
63#include "imx21-hcd.h" 63#include "imx21-hcd.h"
64 64
65#ifdef CONFIG_DYNAMIC_DEBUG
66#define DEBUG
67#endif
68
65#ifdef DEBUG 69#ifdef DEBUG
66#define DEBUG_LOG_FRAME(imx21, etd, event) \ 70#define DEBUG_LOG_FRAME(imx21, etd, event) \
67 (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB) 71 (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB)
diff --git a/drivers/usb/host/imx21-hcd.h b/drivers/usb/host/imx21-hcd.h
index c005770a73e9..05122f8a6983 100644
--- a/drivers/usb/host/imx21-hcd.h
+++ b/drivers/usb/host/imx21-hcd.h
@@ -24,6 +24,10 @@
24#ifndef __LINUX_IMX21_HCD_H__ 24#ifndef __LINUX_IMX21_HCD_H__
25#define __LINUX_IMX21_HCD_H__ 25#define __LINUX_IMX21_HCD_H__
26 26
27#ifdef CONFIG_DYNAMIC_DEBUG
28#define DEBUG
29#endif
30
27#include <linux/platform_data/usb-mx2.h> 31#include <linux/platform_data/usb-mx2.h>
28 32
29#define NUM_ISO_ETDS 2 33#define NUM_ISO_ETDS 2
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 4a6df2d8f902..4a05148ee79b 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -60,6 +60,10 @@
60#define oxu_info(oxu, fmt, args...) \ 60#define oxu_info(oxu, fmt, args...) \
61 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args) 61 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
62 62
63#ifdef CONFIG_DYNAMIC_DEBUG
64#define DEBUG
65#endif
66
63static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu) 67static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu)
64{ 68{
65 return container_of((void *) oxu, struct usb_hcd, hcd_priv); 69 return container_of((void *) oxu, struct usb_hcd, hcd_priv);
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
index 3989f0ad0539..1b28a000d5c6 100644
--- a/drivers/usb/host/uhci-debug.c
+++ b/drivers/usb/host/uhci-debug.c
@@ -20,7 +20,7 @@
20 20
21static struct dentry *uhci_debugfs_root; 21static struct dentry *uhci_debugfs_root;
22 22
23#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 23#ifdef CONFIG_DYNAMIC_DEBUG
24 24
25/* Handle REALLY large printks so we don't overflow buffers */ 25/* Handle REALLY large printks so we don't overflow buffers */
26static void lprintk(char *buf) 26static void lprintk(char *buf)
@@ -635,7 +635,7 @@ static const struct file_operations uhci_debug_operations = {
635 635
636#endif /* CONFIG_DEBUG_FS */ 636#endif /* CONFIG_DEBUG_FS */
637 637
638#else /* DEBUG || CONFIG_DYNAMIC_DEBUG*/ 638#else /* CONFIG_DYNAMIC_DEBUG*/
639 639
640static inline void lprintk(char *buf) 640static inline void lprintk(char *buf)
641{} 641{}
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index d9d3c5a98d83..27f35e8f161b 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -69,7 +69,7 @@ MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications");
69 * show all queues in /sys/kernel/debug/uhci/[pci_addr] 69 * show all queues in /sys/kernel/debug/uhci/[pci_addr]
70 * debug = 3, show all TDs in URBs when dumping 70 * debug = 3, show all TDs in URBs when dumping
71 */ 71 */
72#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 72#ifdef CONFIG_DYNAMIC_DEBUG
73 73
74static int debug = 1; 74static int debug = 1;
75module_param(debug, int, S_IRUGO | S_IWUSR); 75module_param(debug, int, S_IRUGO | S_IWUSR);
@@ -870,7 +870,7 @@ static int __init uhci_hcd_init(void)
870 ignore_oc ? ", overcurrent ignored" : ""); 870 ignore_oc ? ", overcurrent ignored" : "");
871 set_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 871 set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
872 872
873#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 873#ifdef CONFIG_DYNAMIC_DEBUG
874 errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); 874 errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
875 if (!errbuf) 875 if (!errbuf)
876 goto errbuf_failed; 876 goto errbuf_failed;
@@ -931,7 +931,7 @@ static void __exit uhci_hcd_cleanup(void)
931#endif 931#endif
932 kmem_cache_destroy(uhci_up_cachep); 932 kmem_cache_destroy(uhci_up_cachep);
933 debugfs_remove(uhci_debugfs_root); 933 debugfs_remove(uhci_debugfs_root);
934#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 934#ifdef CONFIG_DYNAMIC_DEBUG
935 kfree(errbuf); 935 kfree(errbuf);
936#endif 936#endif
937 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 937 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);