aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-28 15:08:20 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-28 15:08:20 -0700
commitce8b378606196a70278d5b79b2164682ab02b4b0 (patch)
tree3b0f36a1c012d7bf9925ee88674a3032fdb6f412
parent08b6b2c794efd20bb2f84575aec03186e483776d (diff)
downloadpatches-ce8b378606196a70278d5b79b2164682ab02b4b0.tar.gz
usb debug cleanup patches added
-rw-r--r--series18
-rw-r--r--usb-gadget-fix-up-comment.patch27
-rw-r--r--usb-isp116x-remove-dependency-on-config_usb_debug.patch54
-rw-r--r--usb-isp1362-remove-_dbg-usage.patch142
-rw-r--r--usb-isp1362-remove-config_usb_debug-dependency.patch98
-rw-r--r--usb-isp1362-remove-unused-_bug_on-calls.patch137
-rw-r--r--usb-isp1362-remove-unused-_warn_on-calls.patch67
-rw-r--r--usb-phy-remove-config_usb_debug-usage.patch28
-rw-r--r--usb-phy-remove-custom-dbg-macro.patch105
-rw-r--r--usb-sl811-remove-config_usb_debug-dependency.patch308
-rw-r--r--usb-usbatm-don-t-rely-on-config_usb_debug.patch40
-rw-r--r--usb-usbatm-move-the-atm_dbg-call-to-use-dynamic-debug.patch46
-rw-r--r--usb-usbatm-remove-config_usb_debug-dependancy.patch63
-rw-r--r--usb-usbatm-remove-unneeded-trace-printk-calls.patch149
-rw-r--r--usb-usbatm-remove-unused-udsl_assert-macro.patch85
15 files changed, 1366 insertions, 1 deletions
diff --git a/series b/series
index 048b44eb81eb06..73558083c2418e 100644
--- a/series
+++ b/series
@@ -9,6 +9,22 @@ usb-adutux-remove-custom-debug-macro.patch
usb-adutux-remove-custom-debug-macro-and-module-parameter.patch
usb-adutux-remove-direct-calls-to-printk.patch
usb-misc-remove-config_usb_debug-from-makefile.patch
+
+usb-usbatm-remove-unused-udsl_assert-macro.patch
+usb-usbatm-remove-unneeded-trace-printk-calls.patch
+usb-usbatm-don-t-rely-on-config_usb_debug.patch
+usb-usbatm-move-the-atm_dbg-call-to-use-dynamic-debug.patch
+usb-usbatm-remove-config_usb_debug-dependancy.patch
+usb-phy-remove-custom-dbg-macro.patch
+usb-phy-remove-config_usb_debug-usage.patch
+usb-gadget-fix-up-comment.patch
+usb-isp1362-remove-unused-_bug_on-calls.patch
+usb-isp1362-remove-unused-_warn_on-calls.patch
+usb-isp1362-remove-_dbg-usage.patch
+usb-isp1362-remove-config_usb_debug-dependency.patch
+usb-isp116x-remove-dependency-on-config_usb_debug.patch
+usb-sl811-remove-config_usb_debug-dependency.patch
+
cdc-acm.patch
usb-serial-ports-add-minor-and-port-number.patch
usb-serial-idr.patch
@@ -16,7 +32,7 @@ usb-serial-increase-the-number-of-devices-we-support.patch
0001-Simulate-fake-Fn-key-on-PS-2-keyboards-w-o-one-eg.-C.patch
-gregkh/gkh-version.patch
+#gregkh/gkh-version.patch
#####################################################################
# Stuff to be merged for 2.6.37
diff --git a/usb-gadget-fix-up-comment.patch b/usb-gadget-fix-up-comment.patch
new file mode 100644
index 00000000000000..c5d42c0e7362de
--- /dev/null
+++ b/usb-gadget-fix-up-comment.patch
@@ -0,0 +1,27 @@
+From foo@baz Fri Jun 28 11:11:19 PDT 2013
+Date: Fri, 28 Jun 2013 11:11:19 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: gadget: fix up comment
+
+This endif is for CONFIG_USB_GADGET_DEBUG_FILES, not CONFIG_USB_DEBUG,
+so document it properly.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/storage_common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/storage_common.c
++++ b/drivers/usb/gadget/storage_common.c
+@@ -172,7 +172,7 @@ MODULE_PARM_DESC(num_buffers, "Number of
+ */
+ #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
+
+-#endif /* CONFIG_USB_DEBUG */
++#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+ /* check if fsg_num_buffers is within a valid range */
+ static inline int fsg_num_buffers_validate(void)
diff --git a/usb-isp116x-remove-dependency-on-config_usb_debug.patch b/usb-isp116x-remove-dependency-on-config_usb_debug.patch
new file mode 100644
index 00000000000000..6877cbfe4253d1
--- /dev/null
+++ b/usb-isp116x-remove-dependency-on-config_usb_debug.patch
@@ -0,0 +1,54 @@
+From foo@baz Fri Jun 28 11:19:44 PDT 2013
+Date: Fri, 28 Jun 2013 11:19:44 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Olav Kongas <ok@artecdesign.ee>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: isp116x: remove dependency on CONFIG_USB_DEBUG
+
+Move all debugging messages in the driver to use the dynamic debug
+subsystem, and not rely on CONFIG_USB_DEBUG to turn them on or off.
+
+This lets debugging be enabled without having to rebuild the driver, an
+important thing for users that can not do it.
+
+It also removes the pointless IRQ_TEST() macro, as that was totally
+useless and obviously never used.
+
+Cc: Olav Kongas <ok@artecdesign.ee>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/isp116x.h | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+--- a/drivers/usb/host/isp116x.h
++++ b/drivers/usb/host/isp116x.h
+@@ -325,11 +325,7 @@ struct isp116x_ep {
+
+ /*-------------------------------------------------------------------------*/
+
+-#ifdef DEBUG
+-#define DBG(stuff...) printk(KERN_DEBUG "116x: " stuff)
+-#else
+-#define DBG(stuff...) do{}while(0)
+-#endif
++#define DBG(stuff...) pr_debug("116x: " stuff)
+
+ #ifdef VERBOSE
+ # define VDBG DBG
+@@ -358,15 +354,8 @@ struct isp116x_ep {
+ #define isp116x_check_platform_delay(h) 0
+ #endif
+
+-#if defined(DEBUG)
+-#define IRQ_TEST() BUG_ON(!irqs_disabled())
+-#else
+-#define IRQ_TEST() do{}while(0)
+-#endif
+-
+ static inline void isp116x_write_addr(struct isp116x *isp116x, unsigned reg)
+ {
+- IRQ_TEST();
+ writew(reg & 0xff, isp116x->addr_reg);
+ isp116x_delay(isp116x, 300);
+ }
diff --git a/usb-isp1362-remove-_dbg-usage.patch b/usb-isp1362-remove-_dbg-usage.patch
new file mode 100644
index 00000000000000..ba87fd83f214fd
--- /dev/null
+++ b/usb-isp1362-remove-_dbg-usage.patch
@@ -0,0 +1,142 @@
+From foo@baz Fri Jun 28 11:14:57 PDT 2013
+Date: Fri, 28 Jun 2013 11:14:57 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: isp1362: remove _DBG() usage
+
+If you want a debug call, just make it, so move to using the
+already-there DBG() call. No need to make things more complex than they
+really need to be.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/isp1362-hcd.c | 30 +++++++++++++++---------------
+ drivers/usb/host/isp1362.h | 6 ------
+ 2 files changed, 15 insertions(+), 21 deletions(-)
+
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -1573,12 +1573,12 @@ static int isp1362_hub_control(struct us
+ DBG(0, "ClearHubFeature: ");
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+- _DBG(0, "C_HUB_OVER_CURRENT\n");
++ DBG(0, "C_HUB_OVER_CURRENT\n");
+ spin_lock_irqsave(&isp1362_hcd->lock, flags);
+ isp1362_write_reg32(isp1362_hcd, HCRHSTATUS, RH_HS_OCIC);
+ spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
+ case C_HUB_LOCAL_POWER:
+- _DBG(0, "C_HUB_LOCAL_POWER\n");
++ DBG(0, "C_HUB_LOCAL_POWER\n");
+ break;
+ default:
+ goto error;
+@@ -1589,7 +1589,7 @@ static int isp1362_hub_control(struct us
+ switch (wValue) {
+ case C_HUB_OVER_CURRENT:
+ case C_HUB_LOCAL_POWER:
+- _DBG(0, "C_HUB_OVER_CURRENT or C_HUB_LOCAL_POWER\n");
++ DBG(0, "C_HUB_OVER_CURRENT or C_HUB_LOCAL_POWER\n");
+ break;
+ default:
+ goto error;
+@@ -1620,36 +1620,36 @@ static int isp1362_hub_control(struct us
+
+ switch (wValue) {
+ case USB_PORT_FEAT_ENABLE:
+- _DBG(0, "USB_PORT_FEAT_ENABLE\n");
++ DBG(0, "USB_PORT_FEAT_ENABLE\n");
+ tmp = RH_PS_CCS;
+ break;
+ case USB_PORT_FEAT_C_ENABLE:
+- _DBG(0, "USB_PORT_FEAT_C_ENABLE\n");
++ DBG(0, "USB_PORT_FEAT_C_ENABLE\n");
+ tmp = RH_PS_PESC;
+ break;
+ case USB_PORT_FEAT_SUSPEND:
+- _DBG(0, "USB_PORT_FEAT_SUSPEND\n");
++ DBG(0, "USB_PORT_FEAT_SUSPEND\n");
+ tmp = RH_PS_POCI;
+ break;
+ case USB_PORT_FEAT_C_SUSPEND:
+- _DBG(0, "USB_PORT_FEAT_C_SUSPEND\n");
++ DBG(0, "USB_PORT_FEAT_C_SUSPEND\n");
+ tmp = RH_PS_PSSC;
+ break;
+ case USB_PORT_FEAT_POWER:
+- _DBG(0, "USB_PORT_FEAT_POWER\n");
++ DBG(0, "USB_PORT_FEAT_POWER\n");
+ tmp = RH_PS_LSDA;
+
+ break;
+ case USB_PORT_FEAT_C_CONNECTION:
+- _DBG(0, "USB_PORT_FEAT_C_CONNECTION\n");
++ DBG(0, "USB_PORT_FEAT_C_CONNECTION\n");
+ tmp = RH_PS_CSC;
+ break;
+ case USB_PORT_FEAT_C_OVER_CURRENT:
+- _DBG(0, "USB_PORT_FEAT_C_OVER_CURRENT\n");
++ DBG(0, "USB_PORT_FEAT_C_OVER_CURRENT\n");
+ tmp = RH_PS_OCIC;
+ break;
+ case USB_PORT_FEAT_C_RESET:
+- _DBG(0, "USB_PORT_FEAT_C_RESET\n");
++ DBG(0, "USB_PORT_FEAT_C_RESET\n");
+ tmp = RH_PS_PRSC;
+ break;
+ default:
+@@ -1669,7 +1669,7 @@ static int isp1362_hub_control(struct us
+ wIndex--;
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+- _DBG(0, "USB_PORT_FEAT_SUSPEND\n");
++ DBG(0, "USB_PORT_FEAT_SUSPEND\n");
+ spin_lock_irqsave(&isp1362_hcd->lock, flags);
+ isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PSS);
+ isp1362_hcd->rhport[wIndex] =
+@@ -1677,7 +1677,7 @@ static int isp1362_hub_control(struct us
+ spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
+ break;
+ case USB_PORT_FEAT_POWER:
+- _DBG(0, "USB_PORT_FEAT_POWER\n");
++ DBG(0, "USB_PORT_FEAT_POWER\n");
+ spin_lock_irqsave(&isp1362_hcd->lock, flags);
+ isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PPS);
+ isp1362_hcd->rhport[wIndex] =
+@@ -1685,7 +1685,7 @@ static int isp1362_hub_control(struct us
+ spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
+ break;
+ case USB_PORT_FEAT_RESET:
+- _DBG(0, "USB_PORT_FEAT_RESET\n");
++ DBG(0, "USB_PORT_FEAT_RESET\n");
+ spin_lock_irqsave(&isp1362_hcd->lock, flags);
+
+ t1 = jiffies + msecs_to_jiffies(USB_RESET_WIDTH);
+@@ -1719,7 +1719,7 @@ static int isp1362_hub_control(struct us
+ default:
+ error:
+ /* "protocol stall" on error */
+- _DBG(0, "PROTOCOL STALL\n");
++ DBG(0, "PROTOCOL STALL\n");
+ retval = -EPIPE;
+ }
+
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -588,14 +588,8 @@ static inline struct usb_hcd *isp1362_hc
+ if (dbg_level > level) \
+ pr_debug(fmt); \
+ } while (0)
+-#define _DBG(level, fmt...) \
+- do { \
+- if (dbg_level > level) \
+- printk(fmt); \
+- } while (0)
+ #else
+ #define DBG(fmt...) do {} while (0)
+-#define _DBG DBG
+ #endif
+
+ #ifdef VERBOSE
diff --git a/usb-isp1362-remove-config_usb_debug-dependency.patch b/usb-isp1362-remove-config_usb_debug-dependency.patch
new file mode 100644
index 00000000000000..2b3733b45382b2
--- /dev/null
+++ b/usb-isp1362-remove-config_usb_debug-dependency.patch
@@ -0,0 +1,98 @@
+From foo@baz Fri Jun 28 11:16:30 PDT 2013
+Date: Fri, 28 Jun 2013 11:16:30 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: isp1362: remove CONFIG_USB_DEBUG dependency
+
+Now that the debugging macros are cleaned up, just rely on the dynamic
+debug code in the kernel to do the debug messages for the driver.
+
+This lets debugging be enabled without having to rebuild the driver, an
+important thing for users that can not do it.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/isp1362-hcd.c | 6 +-----
+ drivers/usb/host/isp1362.h | 16 ++++------------
+ 2 files changed, 5 insertions(+), 17 deletions(-)
+
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -37,11 +37,7 @@
+ * recovery time (MSCx = 0x7f8c) with a memory clock of 99.53 MHz.
+ */
+
+-#ifdef CONFIG_USB_DEBUG
+-# define ISP1362_DEBUG
+-#else
+-# undef ISP1362_DEBUG
+-#endif
++#undef ISP1362_DEBUG
+
+ /*
+ * The PXA255 UDC apparently doesn't handle GET_STATUS, GET_CONFIG and
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -76,14 +76,14 @@ static inline void delayed_insw(unsigned
+
+ #define ISP1362_REG_WRITE_OFFSET 0x80
+
+-#ifdef ISP1362_DEBUG
+-typedef const unsigned int isp1362_reg_t;
+-
+ #define REG_WIDTH_16 0x000
+ #define REG_WIDTH_32 0x100
+ #define REG_WIDTH_MASK 0x100
+ #define REG_NO_MASK 0x0ff
+
++#ifdef ISP1362_DEBUG
++typedef const unsigned int isp1362_reg_t;
++
+ #define REG_ACCESS_R 0x200
+ #define REG_ACCESS_W 0x400
+ #define REG_ACCESS_RW 0x600
+@@ -582,15 +582,11 @@ static inline struct usb_hcd *isp1362_hc
+ * ISP1362 HW Interface
+ */
+
+-#ifdef ISP1362_DEBUG
+ #define DBG(level, fmt...) \
+ do { \
+ if (dbg_level > level) \
+ pr_debug(fmt); \
+ } while (0)
+-#else
+-#define DBG(fmt...) do {} while (0)
+-#endif
+
+ #ifdef VERBOSE
+ # define VDBG(fmt...) DBG(3, fmt)
+@@ -833,7 +829,6 @@ static void isp1362_write_fifo(struct is
+ isp1362_write_reg32(d, r, __v & ~m); \
+ }
+
+-#ifdef ISP1362_DEBUG
+ #define isp1362_show_reg(d, r) { \
+ if ((ISP1362_REG_##r & REG_WIDTH_MASK) == REG_WIDTH_32) \
+ DBG(0, "%-12s[%02x]: %08x\n", #r, \
+@@ -842,9 +837,6 @@ static void isp1362_write_fifo(struct is
+ DBG(0, "%-12s[%02x]: %04x\n", #r, \
+ ISP1362_REG_NO(ISP1362_REG_##r), isp1362_read_reg16(d, r)); \
+ }
+-#else
+-#define isp1362_show_reg(d, r) do {} while (0)
+-#endif
+
+ static void __attribute__((__unused__)) isp1362_show_regs(struct isp1362_hcd *isp1362_hcd)
+ {
+@@ -967,7 +959,7 @@ static void __attribute__((unused)) dump
+ }
+ }
+
+-#if defined(ISP1362_DEBUG) && defined(PTD_TRACE)
++#if defined(PTD_TRACE)
+
+ static void dump_ptd(struct ptd *ptd)
+ {
diff --git a/usb-isp1362-remove-unused-_bug_on-calls.patch b/usb-isp1362-remove-unused-_bug_on-calls.patch
new file mode 100644
index 00000000000000..c1d3e7fc8277d3
--- /dev/null
+++ b/usb-isp1362-remove-unused-_bug_on-calls.patch
@@ -0,0 +1,137 @@
+From foo@baz Fri Jun 28 11:12:12 PDT 2013
+Date: Fri, 28 Jun 2013 11:12:12 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: isp1362: remove unused _BUG_ON() calls
+
+We shouldn't ever panic in a driver, and these calls were never being
+used, so just delete them, as obviously the driver is working properly
+now (right?)
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/isp1362-hcd.c | 2 --
+ drivers/usb/host/isp1362.h | 20 --------------------
+ 2 files changed, 22 deletions(-)
+
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -350,8 +350,6 @@ static void isp1362_write_ptd(struct isp
+ struct ptd *ptd = &ep->ptd;
+ int len = PTD_GET_DIR(ptd) == PTD_DIR_IN ? 0 : ep->length;
+
+- _BUG_ON(ep->ptd_offset < 0);
+-
+ prefetch(ptd);
+ isp1362_write_buffer(isp1362_hcd, ptd, ep->ptd_offset, PTD_HEADER_SIZE);
+ if (len)
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -91,7 +91,6 @@ typedef const unsigned int isp1362_reg_t
+
+ #define ISP1362_REG_NO(r) ((r) & REG_NO_MASK)
+
+-#define _BUG_ON(x) BUG_ON(x)
+ #define _WARN_ON(x) WARN_ON(x)
+
+ #define ISP1362_REG(name, addr, width, rw) \
+@@ -102,7 +101,6 @@ static isp1362_reg_t ISP1362_REG_##name
+ #else
+ typedef const unsigned char isp1362_reg_t;
+ #define ISP1362_REG_NO(r) (r)
+-#define _BUG_ON(x) do {} while (0)
+ #define _WARN_ON(x) do {} while (0)
+
+ #define ISP1362_REG(name, addr, width, rw) \
+@@ -645,9 +643,7 @@ static inline struct usb_hcd *isp1362_hc
+ */
+ static void isp1362_write_addr(struct isp1362_hcd *isp1362_hcd, isp1362_reg_t reg)
+ {
+- /*_BUG_ON((reg & ISP1362_REG_WRITE_OFFSET) && !(reg & REG_ACCESS_W));*/
+ REG_ACCESS_TEST(reg);
+- _BUG_ON(!irqs_disabled());
+ DUMMY_DELAY_ACCESS;
+ writew(ISP1362_REG_NO(reg), isp1362_hcd->addr_reg);
+ DUMMY_DELAY_ACCESS;
+@@ -656,7 +652,6 @@ static void isp1362_write_addr(struct is
+
+ static void isp1362_write_data16(struct isp1362_hcd *isp1362_hcd, u16 val)
+ {
+- _BUG_ON(!irqs_disabled());
+ DUMMY_DELAY_ACCESS;
+ writew(val, isp1362_hcd->data_reg);
+ }
+@@ -665,7 +660,6 @@ static u16 isp1362_read_data16(struct is
+ {
+ u16 val;
+
+- _BUG_ON(!irqs_disabled());
+ DUMMY_DELAY_ACCESS;
+ val = readw(isp1362_hcd->data_reg);
+
+@@ -674,7 +668,6 @@ static u16 isp1362_read_data16(struct is
+
+ static void isp1362_write_data32(struct isp1362_hcd *isp1362_hcd, u32 val)
+ {
+- _BUG_ON(!irqs_disabled());
+ #if USE_32BIT
+ DUMMY_DELAY_ACCESS;
+ writel(val, isp1362_hcd->data_reg);
+@@ -690,7 +683,6 @@ static u32 isp1362_read_data32(struct is
+ {
+ u32 val;
+
+- _BUG_ON(!irqs_disabled());
+ #if USE_32BIT
+ DUMMY_DELAY_ACCESS;
+ val = readl(isp1362_hcd->data_reg);
+@@ -713,8 +705,6 @@ static void isp1362_read_fifo(struct isp
+ if (!len)
+ return;
+
+- _BUG_ON(!irqs_disabled());
+-
+ RDBG("%s: Reading %d byte from fifo to mem @ %p\n", __func__, len, buf);
+ #if USE_32BIT
+ if (len >= 4) {
+@@ -760,8 +750,6 @@ static void isp1362_write_fifo(struct is
+ return;
+ }
+
+- _BUG_ON(!irqs_disabled());
+-
+ RDBG("%s: Writing %d byte to fifo from memory @%p\n", __func__, len, buf);
+ #if USE_32BIT
+ if (len >= 4) {
+@@ -923,10 +911,6 @@ static void __attribute__((__unused__))
+
+ static void isp1362_write_diraddr(struct isp1362_hcd *isp1362_hcd, u16 offset, u16 len)
+ {
+- _BUG_ON(offset & 1);
+- _BUG_ON(offset >= ISP1362_BUF_SIZE);
+- _BUG_ON(len > ISP1362_BUF_SIZE);
+- _BUG_ON(offset + len > ISP1362_BUF_SIZE);
+ len = (len + 1) & ~1;
+
+ isp1362_clr_mask16(isp1362_hcd, HCDMACFG, HCDMACFG_CTR_ENABLE);
+@@ -936,8 +920,6 @@ static void isp1362_write_diraddr(struct
+
+ static void isp1362_read_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len)
+ {
+- _BUG_ON(offset & 1);
+-
+ isp1362_write_diraddr(isp1362_hcd, offset, len);
+
+ DBG(3, "%s: Reading %d byte from buffer @%04x to memory @ %p\n",
+@@ -956,8 +938,6 @@ static void isp1362_read_buffer(struct i
+
+ static void isp1362_write_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len)
+ {
+- _BUG_ON(offset & 1);
+-
+ isp1362_write_diraddr(isp1362_hcd, offset, len);
+
+ DBG(3, "%s: Writing %d byte to buffer @%04x from memory @ %p\n",
diff --git a/usb-isp1362-remove-unused-_warn_on-calls.patch b/usb-isp1362-remove-unused-_warn_on-calls.patch
new file mode 100644
index 00000000000000..dc110f20767024
--- /dev/null
+++ b/usb-isp1362-remove-unused-_warn_on-calls.patch
@@ -0,0 +1,67 @@
+From foo@baz Fri Jun 28 11:13:39 PDT 2013
+Date: Fri, 28 Jun 2013 11:13:39 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: isp1362: remove unused _WARN_ON() calls
+
+Like _BUG_ON(), _WARN_ON() wasn't ever being used, so just delete it, as
+obviously things are working properly now (if not, we have bigger
+problems...)
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/isp1362.h | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -91,8 +91,6 @@ typedef const unsigned int isp1362_reg_t
+
+ #define ISP1362_REG_NO(r) ((r) & REG_NO_MASK)
+
+-#define _WARN_ON(x) WARN_ON(x)
+-
+ #define ISP1362_REG(name, addr, width, rw) \
+ static isp1362_reg_t ISP1362_REG_##name = ((addr) | (width) | (rw))
+
+@@ -101,7 +99,6 @@ static isp1362_reg_t ISP1362_REG_##name
+ #else
+ typedef const unsigned char isp1362_reg_t;
+ #define ISP1362_REG_NO(r) (r)
+-#define _WARN_ON(x) do {} while (0)
+
+ #define ISP1362_REG(name, addr, width, rw) \
+ static isp1362_reg_t ISP1362_REG_##name = addr
+@@ -926,14 +923,11 @@ static void isp1362_read_buffer(struct i
+ __func__, len, offset, buf);
+
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+- _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+
+ isp1362_write_addr(isp1362_hcd, ISP1362_REG_HCDIRDATA);
+
+ isp1362_read_fifo(isp1362_hcd, buf, len);
+- _WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+- _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+ }
+
+ static void isp1362_write_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len)
+@@ -944,14 +938,11 @@ static void isp1362_write_buffer(struct
+ __func__, len, offset, buf);
+
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+- _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+
+ isp1362_write_addr(isp1362_hcd, ISP1362_REG_HCDIRDATA | ISP1362_REG_WRITE_OFFSET);
+ isp1362_write_fifo(isp1362_hcd, buf, len);
+
+- _WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+- _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+ }
+
+ static void __attribute__((unused)) dump_data(char *buf, int len)
diff --git a/usb-phy-remove-config_usb_debug-usage.patch b/usb-phy-remove-config_usb_debug-usage.patch
new file mode 100644
index 00000000000000..b3cef66fa0123e
--- /dev/null
+++ b/usb-phy-remove-config_usb_debug-usage.patch
@@ -0,0 +1,28 @@
+From foo@baz Fri Jun 28 11:10:15 PDT 2013
+Date: Fri, 28 Jun 2013 11:10:15 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: phy: remove CONFIG_USB_DEBUG usage
+
+Now that no USB phy driver is using CONFIG_USB_DEBUG, remove it from the
+Makefile.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/phy/Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/usb/phy/Makefile
++++ b/drivers/usb/phy/Makefile
+@@ -1,9 +1,6 @@
+ #
+ # Makefile for physical layer USB drivers
+ #
+-
+-ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
+-
+ obj-$(CONFIG_USB_PHY) += phy.o
+
+ # transceiver drivers, keep the list sorted
diff --git a/usb-phy-remove-custom-dbg-macro.patch b/usb-phy-remove-custom-dbg-macro.patch
new file mode 100644
index 00000000000000..603d7e91af778c
--- /dev/null
+++ b/usb-phy-remove-custom-dbg-macro.patch
@@ -0,0 +1,105 @@
+From foo@baz Fri Jun 28 11:08:22 PDT 2013
+Date: Fri, 28 Jun 2013 11:08:22 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: phy: remove custom DBG macro
+
+Use the in-kernel pr_debug() calls instead of trying to roll your own
+DBG macro. This means the dynamic debugging calls now work here, and
+there is no dependency on CONFIG_USB_DEBUG for the phy code anymore.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+
+Note, this is against 3.10-rc7, odds are it will not apply to 3.11-rc1,
+I'll refresh it when that is out and apply it then.
+
+ drivers/usb/phy/phy-fsl-usb.c | 6 +++---
+ drivers/usb/phy/phy-fsm-usb.h | 11 ++---------
+ drivers/usb/phy/phy-isp1301-omap.c | 6 +-----
+ 3 files changed, 6 insertions(+), 17 deletions(-)
+
+--- a/drivers/usb/phy/phy-fsl-usb.c
++++ b/drivers/usb/phy/phy-fsl-usb.c
+@@ -611,7 +611,7 @@ static int fsl_otg_set_peripheral(struct
+ otg_dev->fsm.b_bus_req = 1;
+
+ /* start the gadget right away if the ID pin says Mini-B */
+- DBG("ID pin=%d\n", otg_dev->fsm.id);
++ pr_debug("ID pin=%d\n", otg_dev->fsm.id);
+ if (otg_dev->fsm.id == 1) {
+ fsl_otg_start_host(&otg_dev->fsm, 0);
+ otg_drv_vbus(&otg_dev->fsm, 0);
+@@ -684,7 +684,7 @@ static int fsl_otg_start_hnp(struct usb_
+ if (otg_dev != fsl_otg_dev)
+ return -ENODEV;
+
+- DBG("start_hnp...n");
++ pr_debug("start_hnp...\n");
+
+ /* clear a_bus_req to enter a_suspend state */
+ otg_dev->fsm.a_bus_req = 0;
+@@ -941,7 +941,7 @@ int usb_otg_start(struct platform_device
+ p_otg->fsm.id = 0;
+ }
+
+- DBG("initial ID pin=%d\n", p_otg->fsm.id);
++ pr_debug("initial ID pin=%d\n", p_otg->fsm.id);
+
+ /* enable OTG ID pin interrupt */
+ temp = fsl_readl(&p_otg->dr_mem_map->otgsc);
+--- a/drivers/usb/phy/phy-fsm-usb.h
++++ b/drivers/usb/phy/phy-fsm-usb.h
+@@ -15,18 +15,11 @@
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+-#undef DEBUG
+ #undef VERBOSE
+
+-#ifdef DEBUG
+-#define DBG(fmt, args...) printk(KERN_DEBUG "[%s] " fmt , \
+- __func__, ## args)
+-#else
+-#define DBG(fmt, args...) do {} while (0)
+-#endif
+-
+ #ifdef VERBOSE
+-#define VDBG DBG
++#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \
++ __func__, ## args)
+ #else
+ #define VDBG(stuff...) do {} while (0)
+ #endif
+--- a/drivers/usb/phy/phy-isp1301-omap.c
++++ b/drivers/usb/phy/phy-isp1301-omap.c
+@@ -40,9 +40,7 @@
+
+ #include <mach/usb.h>
+
+-#ifndef DEBUG
+-#undef VERBOSE
+-#endif
++#undef VERBOSE
+
+
+ #define DRIVER_VERSION "24 August 2004"
+@@ -387,7 +385,6 @@ static void b_idle(struct isp1301 *isp,
+ static void
+ dump_regs(struct isp1301 *isp, const char *label)
+ {
+-#ifdef DEBUG
+ u8 ctrl = isp1301_get_u8(isp, ISP1301_OTG_CONTROL_1);
+ u8 status = isp1301_get_u8(isp, ISP1301_OTG_STATUS);
+ u8 src = isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE);
+@@ -396,7 +393,6 @@ dump_regs(struct isp1301 *isp, const cha
+ omap_readl(OTG_CTRL), label, state_name(isp),
+ ctrl, status, src);
+ /* mode control and irq enables don't change much */
+-#endif
+ }
+
+ /*-------------------------------------------------------------------------*/
diff --git a/usb-sl811-remove-config_usb_debug-dependency.patch b/usb-sl811-remove-config_usb_debug-dependency.patch
new file mode 100644
index 00000000000000..3da1ebf5f97738
--- /dev/null
+++ b/usb-sl811-remove-config_usb_debug-dependency.patch
@@ -0,0 +1,308 @@
+From foo@baz Fri Jun 28 11:21:28 PDT 2013
+Date: Fri, 28 Jun 2013 11:21:28 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Felipe Balbi <balbi@ti.com>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: sl811: remove CONFIG_USB_DEBUG dependency
+
+This removes the dependency of the driver on CONFIG_USB_DEBUG and moves
+it to us the dynamic debug subsystem instead. Bonus is the fact that we
+can now properly determine the exact hardware that is spitting out the
+messages.
+
+This lets debugging be enabled without having to rebuild the driver, an
+important thing for users that can not do it.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/sl811-hcd.c | 69 +++++++++++++++++++++++++------------------
+ drivers/usb/host/sl811.h | 19 -----------
+ 2 files changed, 42 insertions(+), 46 deletions(-)
+
+--- a/drivers/usb/host/sl811-hcd.c
++++ b/drivers/usb/host/sl811-hcd.c
+@@ -100,7 +100,8 @@ static void port_power(struct sl811 *sl8
+
+ if (sl811->board && sl811->board->port_power) {
+ /* switch VBUS, at 500mA unless hub power budget gets set */
+- DBG("power %s\n", is_on ? "on" : "off");
++ dev_dbg(hcd->self.controller, "power %s\n",
++ is_on ? "on" : "off");
+ sl811->board->port_power(hcd->self.controller, is_on);
+ }
+
+@@ -282,7 +283,7 @@ static inline void sofirq_on(struct sl81
+ {
+ if (sl811->irq_enable & SL11H_INTMASK_SOFINTR)
+ return;
+- VDBG("sof irq on\n");
++ dev_dbg(sl811_to_hcd(sl811)->self.controller, "sof irq on\n");
+ sl811->irq_enable |= SL11H_INTMASK_SOFINTR;
+ }
+
+@@ -290,7 +291,7 @@ static inline void sofirq_off(struct sl8
+ {
+ if (!(sl811->irq_enable & SL11H_INTMASK_SOFINTR))
+ return;
+- VDBG("sof irq off\n");
++ dev_dbg(sl811_to_hcd(sl811)->self.controller, "sof irq off\n");
+ sl811->irq_enable &= ~SL11H_INTMASK_SOFINTR;
+ }
+
+@@ -338,7 +339,8 @@ static struct sl811h_ep *start(struct sl
+ }
+
+ if (unlikely(list_empty(&ep->hep->urb_list))) {
+- DBG("empty %p queue?\n", ep);
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "empty %p queue?\n", ep);
+ return NULL;
+ }
+
+@@ -391,7 +393,8 @@ static struct sl811h_ep *start(struct sl
+ status_packet(sl811, ep, urb, bank, control);
+ break;
+ default:
+- DBG("bad ep%p pid %02x\n", ep, ep->nextpid);
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "bad ep%p pid %02x\n", ep, ep->nextpid);
+ ep = NULL;
+ }
+ return ep;
+@@ -447,7 +450,8 @@ static void finish_request(
+ }
+
+ /* periodic deschedule */
+- DBG("deschedule qh%d/%p branch %d\n", ep->period, ep, ep->branch);
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "deschedule qh%d/%p branch %d\n", ep->period, ep, ep->branch);
+ for (i = ep->branch; i < PERIODIC_SIZE; i += ep->period) {
+ struct sl811h_ep *temp;
+ struct sl811h_ep **prev = &sl811->periodic[i];
+@@ -593,7 +597,8 @@ static inline u8 checkdone(struct sl811
+ ctl = sl811_read(sl811, SL811_EP_A(SL11H_HOSTCTLREG));
+ if (ctl & SL11H_HCTLMASK_ARM)
+ sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG), 0);
+- DBG("%s DONE_A: ctrl %02x sts %02x\n",
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "%s DONE_A: ctrl %02x sts %02x\n",
+ (ctl & SL11H_HCTLMASK_ARM) ? "timeout" : "lost",
+ ctl,
+ sl811_read(sl811, SL811_EP_A(SL11H_PKTSTATREG)));
+@@ -604,7 +609,8 @@ static inline u8 checkdone(struct sl811
+ ctl = sl811_read(sl811, SL811_EP_B(SL11H_HOSTCTLREG));
+ if (ctl & SL11H_HCTLMASK_ARM)
+ sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);
+- DBG("%s DONE_B: ctrl %02x sts %02x\n",
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "%s DONE_B: ctrl %02x sts %02x\n",
+ (ctl & SL11H_HCTLMASK_ARM) ? "timeout" : "lost",
+ ctl,
+ sl811_read(sl811, SL811_EP_B(SL11H_PKTSTATREG)));
+@@ -665,7 +671,7 @@ retry:
+ * this one has nothing scheduled.
+ */
+ if (sl811->next_periodic) {
+- // ERR("overrun to slot %d\n", index);
++ // dev_err(hcd->self.controller, "overrun to slot %d\n", index);
+ sl811->stat_overrun++;
+ }
+ if (sl811->periodic[index])
+@@ -723,7 +729,7 @@ retry:
+
+ } else if (irqstat & SL11H_INTMASK_RD) {
+ if (sl811->port1 & USB_PORT_STAT_SUSPEND) {
+- DBG("wakeup\n");
++ dev_dbg(hcd->self.controller, "wakeup\n");
+ sl811->port1 |= USB_PORT_STAT_C_SUSPEND << 16;
+ sl811->stat_wake++;
+ } else
+@@ -852,8 +858,9 @@ static int sl811h_urb_enqueue(
+
+ if (ep->maxpacket > H_MAXPACKET) {
+ /* iso packets up to 240 bytes could work... */
+- DBG("dev %d ep%d maxpacket %d\n",
+- udev->devnum, epnum, ep->maxpacket);
++ dev_dbg(hcd->self.controller,
++ "dev %d ep%d maxpacket %d\n", udev->devnum,
++ epnum, ep->maxpacket);
+ retval = -EINVAL;
+ kfree(ep);
+ goto fail;
+@@ -917,7 +924,8 @@ static int sl811h_urb_enqueue(
+ * to share the faster parts of the tree without needing
+ * dummy/placeholder nodes
+ */
+- DBG("schedule qh%d/%p branch %d\n", ep->period, ep, ep->branch);
++ dev_dbg(hcd->self.controller, "schedule qh%d/%p branch %d\n",
++ ep->period, ep, ep->branch);
+ for (i = ep->branch; i < PERIODIC_SIZE; i += ep->period) {
+ struct sl811h_ep **prev = &sl811->periodic[i];
+ struct sl811h_ep *here = *prev;
+@@ -976,7 +984,8 @@ static int sl811h_urb_dequeue(struct usb
+ } else if (sl811->active_a == ep) {
+ if (time_before_eq(sl811->jiffies_a, jiffies)) {
+ /* happens a lot with lowspeed?? */
+- DBG("giveup on DONE_A: ctrl %02x sts %02x\n",
++ dev_dbg(hcd->self.controller,
++ "giveup on DONE_A: ctrl %02x sts %02x\n",
+ sl811_read(sl811,
+ SL811_EP_A(SL11H_HOSTCTLREG)),
+ sl811_read(sl811,
+@@ -990,7 +999,8 @@ static int sl811h_urb_dequeue(struct usb
+ } else if (sl811->active_b == ep) {
+ if (time_before_eq(sl811->jiffies_a, jiffies)) {
+ /* happens a lot with lowspeed?? */
+- DBG("giveup on DONE_B: ctrl %02x sts %02x\n",
++ dev_dbg(hcd->self.controller,
++ "giveup on DONE_B: ctrl %02x sts %02x\n",
+ sl811_read(sl811,
+ SL811_EP_B(SL11H_HOSTCTLREG)),
+ sl811_read(sl811,
+@@ -1008,7 +1018,8 @@ static int sl811h_urb_dequeue(struct usb
+ if (urb)
+ finish_request(sl811, ep, urb, 0);
+ else
+- VDBG("dequeue, urb %p active %s; wait4irq\n", urb,
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "dequeue, urb %p active %s; wait4irq\n", urb,
+ (sl811->active_a == ep) ? "A" : "B");
+ } else
+ retval = -EINVAL;
+@@ -1029,7 +1040,7 @@ sl811h_endpoint_disable(struct usb_hcd *
+ if (!list_empty(&hep->urb_list))
+ msleep(3);
+ if (!list_empty(&hep->urb_list))
+- WARNING("ep %p not empty?\n", ep);
++ dev_warn(hcd->self.controller, "ep %p not empty?\n", ep);
+
+ kfree(ep);
+ hep->hcpriv = NULL;
+@@ -1132,7 +1143,7 @@ sl811h_timer(unsigned long _sl811)
+
+ switch (signaling) {
+ case SL11H_CTL1MASK_SE0:
+- DBG("end reset\n");
++ dev_dbg(sl811_to_hcd(sl811)->self.controller, "end reset\n");
+ sl811->port1 = (USB_PORT_STAT_C_RESET << 16)
+ | USB_PORT_STAT_POWER;
+ sl811->ctrl1 = 0;
+@@ -1141,11 +1152,12 @@ sl811h_timer(unsigned long _sl811)
+ irqstat &= ~SL11H_INTMASK_RD;
+ break;
+ case SL11H_CTL1MASK_K:
+- DBG("end resume\n");
++ dev_dbg(sl811_to_hcd(sl811)->self.controller, "end resume\n");
+ sl811->port1 &= ~USB_PORT_STAT_SUSPEND;
+ break;
+ default:
+- DBG("odd timer signaling: %02x\n", signaling);
++ dev_dbg(sl811_to_hcd(sl811)->self.controller,
++ "odd timer signaling: %02x\n", signaling);
+ break;
+ }
+ sl811_write(sl811, SL11H_IRQ_STATUS, irqstat);
+@@ -1243,7 +1255,7 @@ sl811h_hub_control(
+ break;
+
+ /* 20 msec of resume/K signaling, other irqs blocked */
+- DBG("start resume...\n");
++ dev_dbg(hcd->self.controller, "start resume...\n");
+ sl811->irq_enable = 0;
+ sl811_write(sl811, SL11H_IRQ_ENABLE,
+ sl811->irq_enable);
+@@ -1281,7 +1293,8 @@ sl811h_hub_control(
+ #ifndef VERBOSE
+ if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
+ #endif
+- DBG("GetPortStatus %08x\n", sl811->port1);
++ dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
++ sl811->port1);
+ break;
+ case SetPortFeature:
+ if (wIndex != 1 || wLength != 0)
+@@ -1293,7 +1306,7 @@ sl811h_hub_control(
+ if (!(sl811->port1 & USB_PORT_STAT_ENABLE))
+ goto error;
+
+- DBG("suspend...\n");
++ dev_dbg(hcd->self.controller,"suspend...\n");
+ sl811->ctrl1 &= ~SL11H_CTL1MASK_SOF_ENA;
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+ break;
+@@ -1338,7 +1351,7 @@ static int
+ sl811h_bus_suspend(struct usb_hcd *hcd)
+ {
+ // SOFs off
+- DBG("%s\n", __func__);
++ dev_dbg(hcd->self.controller, "%s\n", __func__);
+ return 0;
+ }
+
+@@ -1346,7 +1359,7 @@ static int
+ sl811h_bus_resume(struct usb_hcd *hcd)
+ {
+ // SOFs on
+- DBG("%s\n", __func__);
++ dev_dbg(hcd->self.controller, "%s\n", __func__);
+ return 0;
+ }
+
+@@ -1648,7 +1661,7 @@ sl811h_probe(struct platform_device *dev
+
+ /* refuse to confuse usbcore */
+ if (dev->dev.dma_mask) {
+- DBG("no we won't dma\n");
++ dev_dbg(&dev->dev, "no we won't dma\n");
+ return -EINVAL;
+ }
+
+@@ -1716,7 +1729,7 @@ sl811h_probe(struct platform_device *dev
+ break;
+ default:
+ /* reject case 0, SL11S is less functional */
+- DBG("chiprev %02x\n", tmp);
++ dev_dbg(&dev->dev, "chiprev %02x\n", tmp);
+ retval = -ENXIO;
+ goto err6;
+ }
+@@ -1747,7 +1760,7 @@ sl811h_probe(struct platform_device *dev
+ if (!ioaddr)
+ iounmap(addr_reg);
+ err2:
+- DBG("init error, %d\n", retval);
++ dev_dbg(&dev->dev, "init error, %d\n", retval);
+ return retval;
+ }
+
+--- a/drivers/usb/host/sl811.h
++++ b/drivers/usb/host/sl811.h
+@@ -242,25 +242,8 @@ sl811_read_buf(struct sl811 *sl811, int
+
+ /*-------------------------------------------------------------------------*/
+
+-#ifdef DEBUG
+-#define DBG(stuff...) printk(KERN_DEBUG "sl811: " stuff)
+-#else
+-#define DBG(stuff...) do{}while(0)
+-#endif
+-
+-#ifdef VERBOSE
+-# define VDBG DBG
+-#else
+-# define VDBG(stuff...) do{}while(0)
+-#endif
+-
+ #ifdef PACKET_TRACE
+-# define PACKET VDBG
++# define PACKET pr_debug("sl811: "stuff)
+ #else
+ # define PACKET(stuff...) do{}while(0)
+ #endif
+-
+-#define ERR(stuff...) printk(KERN_ERR "sl811: " stuff)
+-#define WARNING(stuff...) printk(KERN_WARNING "sl811: " stuff)
+-#define INFO(stuff...) printk(KERN_INFO "sl811: " stuff)
+-
diff --git a/usb-usbatm-don-t-rely-on-config_usb_debug.patch b/usb-usbatm-don-t-rely-on-config_usb_debug.patch
new file mode 100644
index 00000000000000..dc6ff519a37a32
--- /dev/null
+++ b/usb-usbatm-don-t-rely-on-config_usb_debug.patch
@@ -0,0 +1,40 @@
+From foo@baz Fri Jun 28 11:03:03 PDT 2013
+Date: Fri, 28 Jun 2013 11:03:03 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Duncan Sands <duncan.sands@free.fr>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: usbatm: don't rely on CONFIG_USB_DEBUG
+
+Enable the USB atm drivers to use the dynamic debugging subsystem, and
+not rely on if CONFIG_USB_DEBUG is enabled or not for debugging
+messages. This also provides a saner debug message, pointing out the
+exact device the message is coming from.
+
+This also means the drivers do not have to be rebuilt to get debugging
+messages, important for getting information from users who can not
+rebuild their kernels.
+
+Cc: Duncan Sands <duncan.sands@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/atm/usbatm.h | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/drivers/usb/atm/usbatm.h
++++ b/drivers/usb/atm/usbatm.h
+@@ -45,13 +45,8 @@
+ dev_info(&(instance)->usb_intf->dev , format , ## arg)
+ #define usb_warn(instance, format, arg...) \
+ dev_warn(&(instance)->usb_intf->dev , format , ## arg)
+-#ifdef DEBUG
+ #define usb_dbg(instance, format, arg...) \
+- dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg)
+-#else
+-#define usb_dbg(instance, format, arg...) \
+- do {} while (0)
+-#endif
++ dev_dbg(&(instance)->usb_intf->dev , format , ## arg)
+
+ /* FIXME: move to dev_* once ATM is driver model aware */
+ #define atm_printk(level, instance, format, arg...) \
diff --git a/usb-usbatm-move-the-atm_dbg-call-to-use-dynamic-debug.patch b/usb-usbatm-move-the-atm_dbg-call-to-use-dynamic-debug.patch
new file mode 100644
index 00000000000000..e2b15aa5168699
--- /dev/null
+++ b/usb-usbatm-move-the-atm_dbg-call-to-use-dynamic-debug.patch
@@ -0,0 +1,46 @@
+From foo@baz Fri Jun 28 11:04:33 PDT 2013
+Date: Fri, 28 Jun 2013 11:04:33 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Duncan Sands <duncan.sands@free.fr>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: usbatm: move the atm_dbg() call to use dynamic debug
+
+Move the atm_dbg() call to use the dynamic debug subsystem, and not rely
+on CONFIG_USB_DEBUG for if things should be printed out or not.
+
+This also means the drivers do not have to be rebuilt to get debugging
+messages, important for getting information from users who can not
+rebuild their kernels.
+
+Cc: Duncan Sands <duncan.sands@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/atm/usbatm.h | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/atm/usbatm.h
++++ b/drivers/usb/atm/usbatm.h
+@@ -59,18 +59,12 @@
+ atm_printk(KERN_INFO, instance , format , ## arg)
+ #define atm_warn(instance, format, arg...) \
+ atm_printk(KERN_WARNING, instance , format , ## arg)
+-#ifdef DEBUG
+-#define atm_dbg(instance, format, arg...) \
+- atm_printk(KERN_DEBUG, instance , format , ## arg)
+-#define atm_rldbg(instance, format, arg...) \
++#define atm_dbg(instance, format, arg...) \
++ dynamic_pr_debug("ATM dev %d: " format , \
++ (instance)->atm_dev->number , ## arg)
++#define atm_rldbg(instance, format, arg...) \
+ if (printk_ratelimit()) \
+- atm_printk(KERN_DEBUG, instance , format , ## arg)
+-#else
+-#define atm_dbg(instance, format, arg...) \
+- do {} while (0)
+-#define atm_rldbg(instance, format, arg...) \
+- do {} while (0)
+-#endif
++ atm_dbg(instance , format , ## arg)
+
+
+ /* flags, set by mini-driver in bind() */
diff --git a/usb-usbatm-remove-config_usb_debug-dependancy.patch b/usb-usbatm-remove-config_usb_debug-dependancy.patch
new file mode 100644
index 00000000000000..d1ac1c7b9525f2
--- /dev/null
+++ b/usb-usbatm-remove-config_usb_debug-dependancy.patch
@@ -0,0 +1,63 @@
+From foo@baz Fri Jun 28 11:06:30 PDT 2013
+Date: Fri, 28 Jun 2013 11:06:30 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Duncan Sands <duncan.sands@free.fr>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: usbatm: remove CONFIG_USB_DEBUG dependancy
+
+Now that no USB atm driver is relying on the CONFIG_USB_DEBUG option
+(well, really the DEBUG option, thanks to some Makefile fun), remove it
+from the Makefile.
+
+Also remove two last vestiges of DEBUG in the usbatm.c driver, moving
+one to VERBOSE_DEBUG, which no one ever really cares about, and the
+other to use the dynamic debug subsystem.
+
+Cc: Duncan Sands <duncan.sands@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/atm/Makefile | 3 ---
+ drivers/usb/atm/usbatm.c | 7 +++----
+ 2 files changed, 3 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/atm/Makefile
++++ b/drivers/usb/atm/Makefile
+@@ -1,9 +1,6 @@
+ #
+ # Makefile for USB ATM/xDSL drivers
+ #
+-
+-ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
+-
+ obj-$(CONFIG_USB_CXACRU) += cxacru.o
+ obj-$(CONFIG_USB_SPEEDTOUCH) += speedtch.o
+ obj-$(CONFIG_USB_UEAGLEATM) += ueagle-atm.o
+--- a/drivers/usb/atm/usbatm.c
++++ b/drivers/usb/atm/usbatm.c
+@@ -661,7 +661,7 @@ static int usbatm_atm_send(struct atm_vc
+
+ /* racy disconnection check - fine */
+ if (!instance || instance->disconnected) {
+-#ifdef DEBUG
++#ifdef VERBOSE_DEBUG
+ printk_ratelimited(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
+ #endif
+ err = -ENODEV;
+@@ -1119,14 +1119,13 @@ int usbatm_usb_probe(struct usb_interfac
+ instance->rx_channel.buf_size = num_packets * maxpacket;
+ instance->rx_channel.packet_size = maxpacket;
+
+-#ifdef DEBUG
+ for (i = 0; i < 2; i++) {
+ struct usbatm_channel *channel = i ?
+ &instance->tx_channel : &instance->rx_channel;
+
+- dev_dbg(dev, "%s: using %d byte buffer for %s channel 0x%p\n", __func__, channel->buf_size, i ? "tx" : "rx", channel);
++ dev_dbg(dev, "%s: using %d byte buffer for %s channel 0x%p\n",
++ __func__, channel->buf_size, i ? "tx" : "rx", channel);
+ }
+-#endif
+
+ /* initialize urbs */
+
diff --git a/usb-usbatm-remove-unneeded-trace-printk-calls.patch b/usb-usbatm-remove-unneeded-trace-printk-calls.patch
new file mode 100644
index 00000000000000..77bfec82b3b474
--- /dev/null
+++ b/usb-usbatm-remove-unneeded-trace-printk-calls.patch
@@ -0,0 +1,149 @@
+From foo@baz Fri Jun 28 11:02:03 PDT 2013
+Date: Fri, 28 Jun 2013 11:02:03 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Duncan Sands <duncan.sands@free.fr>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: usbatm: remove unneeded trace printk calls
+
+We have an in-kernel trace subsystem, so use that instead of printk for
+trying to figure out what functions are being called.
+
+Cc: Duncan Sands <duncan.sands@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/atm/usbatm.c | 34 ----------------------------------
+ 1 file changed, 34 deletions(-)
+
+--- a/drivers/usb/atm/usbatm.c
++++ b/drivers/usb/atm/usbatm.c
+@@ -311,8 +311,6 @@ static void usbatm_extract_one_cell(stru
+ int vci = ((source[1] & 0x0f) << 12) | (source[2] << 4) | (source[3] >> 4);
+ u8 pti = ((source[3] & 0xe) >> 1);
+
+- vdbg(&instance->usb_intf->dev, "%s: vpi %hd, vci %d, pti %d", __func__, vpi, vci, pti);
+-
+ if ((vci != instance->cached_vci) || (vpi != instance->cached_vpi)) {
+ instance->cached_vpi = vpi;
+ instance->cached_vci = vci;
+@@ -476,9 +474,6 @@ static unsigned int usbatm_write_cells(s
+ unsigned int bytes_written;
+ unsigned int stride = instance->tx_channel.stride;
+
+- vdbg(&instance->usb_intf->dev, "%s: skb->len=%d, avail_space=%u",
+- __func__, skb->len, avail_space);
+-
+ for (bytes_written = 0; bytes_written < avail_space && ctrl->len;
+ bytes_written += stride, target += stride) {
+ unsigned int data_len = min_t(unsigned int, skb->len, ATM_CELL_PAYLOAD);
+@@ -639,7 +634,6 @@ static void usbatm_cancel_send(struct us
+ {
+ struct sk_buff *skb, *n;
+
+- atm_dbg(instance, "%s entered\n", __func__);
+ spin_lock_irq(&instance->sndqueue.lock);
+ skb_queue_walk_safe(&instance->sndqueue, skb, n) {
+ if (UDSL_SKB(skb)->atm.vcc == vcc) {
+@@ -657,7 +651,6 @@ static void usbatm_cancel_send(struct us
+ usbatm_pop(vcc, skb);
+ }
+ tasklet_enable(&instance->tx_channel.tasklet);
+- atm_dbg(instance, "%s done\n", __func__);
+ }
+
+ static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -675,9 +668,6 @@ static int usbatm_atm_send(struct atm_vc
+ goto fail;
+ }
+
+- vdbg(&instance->usb_intf->dev, "%s called (skb 0x%p, len %u)", __func__,
+- skb, skb->len);
+-
+ if (vcc->qos.aal != ATM_AAL5) {
+ atm_rldbg(instance, "%s: unsupported ATM type %d!\n", __func__, vcc->qos.aal);
+ err = -EINVAL;
+@@ -717,8 +707,6 @@ static void usbatm_destroy_instance(stru
+ {
+ struct usbatm_data *instance = container_of(kref, struct usbatm_data, refcount);
+
+- usb_dbg(instance, "%s\n", __func__);
+-
+ tasklet_kill(&instance->rx_channel.tasklet);
+ tasklet_kill(&instance->tx_channel.tasklet);
+ usb_put_dev(instance->usb_dev);
+@@ -727,15 +715,11 @@ static void usbatm_destroy_instance(stru
+
+ static void usbatm_get_instance(struct usbatm_data *instance)
+ {
+- usb_dbg(instance, "%s\n", __func__);
+-
+ kref_get(&instance->refcount);
+ }
+
+ static void usbatm_put_instance(struct usbatm_data *instance)
+ {
+- usb_dbg(instance, "%s\n", __func__);
+-
+ kref_put(&instance->refcount, usbatm_destroy_instance);
+ }
+
+@@ -751,7 +735,6 @@ static void usbatm_atm_dev_close(struct
+ if (!instance)
+ return;
+
+- usb_dbg(instance, "%s\n", __func__);
+ atm_dev->dev_data = NULL; /* catch bugs */
+ usbatm_put_instance(instance); /* taken in usbatm_atm_init */
+ }
+@@ -807,8 +790,6 @@ static int usbatm_atm_open(struct atm_vc
+ if (!instance)
+ return -ENODEV;
+
+- atm_dbg(instance, "%s: vpi %hd, vci %d\n", __func__, vpi, vci);
+-
+ /* only support AAL5 */
+ if ((vcc->qos.aal != ATM_AAL5)) {
+ atm_warn(instance, "%s: unsupported ATM type %d!\n", __func__, vcc->qos.aal);
+@@ -885,11 +866,6 @@ static void usbatm_atm_close(struct atm_
+ if (!instance || !vcc_data)
+ return;
+
+- atm_dbg(instance, "%s entered\n", __func__);
+-
+- atm_dbg(instance, "%s: deallocating vcc 0x%p with vpi %d vci %d\n",
+- __func__, vcc_data, vcc_data->vpi, vcc_data->vci);
+-
+ usbatm_cancel_send(instance, vcc);
+
+ mutex_lock(&instance->serialize); /* vs self, usbatm_atm_open, usbatm_usb_disconnect */
+@@ -916,8 +892,6 @@ static void usbatm_atm_close(struct atm_
+ clear_bit(ATM_VF_ADDR, &vcc->flags);
+
+ mutex_unlock(&instance->serialize);
+-
+- atm_dbg(instance, "%s successful\n", __func__);
+ }
+
+ static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd,
+@@ -1054,12 +1028,6 @@ int usbatm_usb_probe(struct usb_interfac
+ int i, length;
+ unsigned int maxpacket, num_packets;
+
+- dev_dbg(dev, "%s: trying driver %s with vendor=%04x, product=%04x, ifnum %2d\n",
+- __func__, driver->driver_name,
+- le16_to_cpu(usb_dev->descriptor.idVendor),
+- le16_to_cpu(usb_dev->descriptor.idProduct),
+- intf->altsetting->desc.bInterfaceNumber);
+-
+ /* instance init */
+ instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
+ if (!instance) {
+@@ -1257,8 +1225,6 @@ void usbatm_usb_disconnect(struct usb_in
+ struct usbatm_vcc_data *vcc_data;
+ int i;
+
+- dev_dbg(dev, "%s entered\n", __func__);
+-
+ if (!instance) {
+ dev_dbg(dev, "%s: NULL instance!\n", __func__);
+ return;
diff --git a/usb-usbatm-remove-unused-udsl_assert-macro.patch b/usb-usbatm-remove-unused-udsl_assert-macro.patch
new file mode 100644
index 00000000000000..69467c67fd2f8c
--- /dev/null
+++ b/usb-usbatm-remove-unused-udsl_assert-macro.patch
@@ -0,0 +1,85 @@
+From foo@baz Fri Jun 28 11:00:13 PDT 2013
+Date: Fri, 28 Jun 2013 11:00:13 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+Cc: Duncan Sands <duncan.sands@free.fr>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: usbatm: remove unused UDSL_ASSERT macro
+
+If this code isn't triggering this assert by now, it never will, so just
+remove it, it's pointless.
+
+Cc: Duncan Sands <duncan.sands@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/usb/atm/usbatm.c | 8 --------
+ drivers/usb/atm/usbatm.h | 12 ------------
+ 2 files changed, 20 deletions(-)
+
+--- a/drivers/usb/atm/usbatm.c
++++ b/drivers/usb/atm/usbatm.c
+@@ -344,7 +344,6 @@ static void usbatm_extract_one_cell(stru
+ __func__, sarb->len, vcc);
+ /* discard cells already received */
+ skb_trim(sarb, 0);
+- UDSL_ASSERT(instance, sarb->tail + ATM_CELL_PAYLOAD <= sarb->end);
+ }
+
+ memcpy(skb_tail_pointer(sarb), source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD);
+@@ -437,8 +436,6 @@ static void usbatm_extract_cells(struct
+ unsigned char *cell_buf = instance->cell_buf;
+ unsigned int space_left = stride - buf_usage;
+
+- UDSL_ASSERT(instance, buf_usage <= stride);
+-
+ if (avail_data >= space_left) {
+ /* add new data and process cell */
+ memcpy(cell_buf + buf_usage, source, space_left);
+@@ -481,7 +478,6 @@ static unsigned int usbatm_write_cells(s
+
+ vdbg(&instance->usb_intf->dev, "%s: skb->len=%d, avail_space=%u",
+ __func__, skb->len, avail_space);
+- UDSL_ASSERT(instance, !(avail_space % stride));
+
+ for (bytes_written = 0; bytes_written < avail_space && ctrl->len;
+ bytes_written += stride, target += stride) {
+@@ -553,8 +549,6 @@ static void usbatm_rx_process(unsigned l
+ if (!urb->iso_frame_desc[i].status) {
+ unsigned int actual_length = urb->iso_frame_desc[i].actual_length;
+
+- UDSL_ASSERT(instance, actual_length <= packet_size);
+-
+ if (!merge_length)
+ merge_start = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
+ merge_length += actual_length;
+@@ -1175,8 +1169,6 @@ int usbatm_usb_probe(struct usb_interfac
+ struct urb *urb;
+ unsigned int iso_packets = usb_pipeisoc(channel->endpoint) ? channel->buf_size / channel->packet_size : 0;
+
+- UDSL_ASSERT(instance, !usb_pipeisoc(channel->endpoint) || usb_pipein(channel->endpoint));
+-
+ urb = usb_alloc_urb(iso_packets, GFP_KERNEL);
+ if (!urb) {
+ dev_err(dev, "%s: no memory for urb %d!\n", __func__, i);
+--- a/drivers/usb/atm/usbatm.h
++++ b/drivers/usb/atm/usbatm.h
+@@ -39,18 +39,6 @@
+ #define VERBOSE_DEBUG
+ */
+
+-#ifdef DEBUG
+-#define UDSL_ASSERT(instance, x) BUG_ON(!(x))
+-#else
+-#define UDSL_ASSERT(instance, x) \
+- do { \
+- if (!(x)) \
+- dev_warn(&(instance)->usb_intf->dev, \
+- "failed assertion '%s' at line %d", \
+- __stringify(x), __LINE__); \
+- } while (0)
+-#endif
+-
+ #define usb_err(instance, format, arg...) \
+ dev_err(&(instance)->usb_intf->dev , format , ## arg)
+ #define usb_info(instance, format, arg...) \