aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-19 15:40:43 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-19 15:40:43 -0800
commitd4f657e8c1271f03fdd633efc8ade15778100697 (patch)
tree44d1e9e9b1a6881ae2e3dfdbd494e71f0b87a8b8
parent5e0505442dd4c3aff794e8db2ed919e3bbb6670a (diff)
downloadpatches-d4f657e8c1271f03fdd633efc8ade15778100697.tar.gz
break out the USB patches to individual pieces
-rw-r--r--series6
-rw-r--r--usb-c67x00-remove-config_usb_debug-dependancy.patch72
-rw-r--r--usb-core-remove-config_usb_debug-usage.patch99
-rw-r--r--usb-gadget-fix-up-some-comments-about-config_usb_debug.patch40
-rw-r--r--usb_debug_removal.patch181
5 files changed, 216 insertions, 182 deletions
diff --git a/series b/series
index adb017264d3e23..1a54f99a3639b8 100644
--- a/series
+++ b/series
@@ -1,6 +1,10 @@
pci-msi-fix.patch
-usb_debug_removal.patch
+usb-c67x00-remove-config_usb_debug-dependancy.patch
+usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
+usb-core-remove-config_usb_debug-usage.patch
+watchdog-pcwd_usb-remove-config_usb_debug-usage.patch
+
staging-exfat-add-filesystem-to-drivers-staging-exfat.patch
staging-exfat-add-filesystem-to-the-build.patch
staging-exfat-include-aio.h.patch
diff --git a/usb-c67x00-remove-config_usb_debug-dependancy.patch b/usb-c67x00-remove-config_usb_debug-dependancy.patch
new file mode 100644
index 00000000000000..362e6af2c6b5cb
--- /dev/null
+++ b/usb-c67x00-remove-config_usb_debug-dependancy.patch
@@ -0,0 +1,72 @@
+From foo@baz Thu Dec 19 15:32:59 PST 2013
+Date: Thu, 19 Dec 2013 15:32:59 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] USB: c67x00: remove CONFIG_USB_DEBUG dependancy
+
+This removes the usage of CONFIG_USB_DEBUG in the c67x00 driver. There
+was only one place, where the TD was dumped to the kernel log, and that
+was using the dynamic debug infrastructure already, with the exception
+of the call to print_hex_dump(). So move everything to the dynamic
+debug infrastructure, including one odd printk(KERN_DEBUG...) line that
+looks like it was forgotten about a long time ago.
+
+
+Cc: Peter Korsgaard <jacmet@sunsite.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/c67x00/Makefile | 2 --
+ drivers/usb/c67x00/c67x00-sched.c | 15 +++------------
+ 2 files changed, 3 insertions(+), 14 deletions(-)
+
+--- a/drivers/usb/c67x00/Makefile
++++ b/drivers/usb/c67x00/Makefile
+@@ -2,8 +2,6 @@
+ # Makefile for Cypress C67X00 USB Controller
+ #
+
+-ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
+-
+ obj-$(CONFIG_USB_C67X00_HCD) += c67x00.o
+
+ c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
+--- a/drivers/usb/c67x00/c67x00-sched.c
++++ b/drivers/usb/c67x00/c67x00-sched.c
+@@ -144,8 +144,6 @@ struct c67x00_urb_priv {
+
+ /* -------------------------------------------------------------------------- */
+
+-#ifdef DEBUG
+-
+ /**
+ * dbg_td - Dump the contents of the TD
+ */
+@@ -166,16 +164,8 @@ static void dbg_td(struct c67x00_hcd *c6
+ dev_dbg(dev, "retry_cnt: 0x%02x\n", td->retry_cnt);
+ dev_dbg(dev, "residue: 0x%02x\n", td->residue);
+ dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
+- dev_dbg(dev, "data:");
+- print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
+- td->data, td_length(td), 1);
++ dev_dbg(dev, "data: %*ph\n", td_length(td), td->data);
+ }
+-#else /* DEBUG */
+-
+-static inline void
+-dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg) { }
+-
+-#endif /* DEBUG */
+
+ /* -------------------------------------------------------------------------- */
+ /* Helper functions */
+@@ -780,7 +770,8 @@ static int c67x00_add_iso_urb(struct c67
+ ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0,
+ urbp->cnt);
+ if (ret) {
+- printk(KERN_DEBUG "create failed: %d\n", ret);
++ dev_dbg(c67x00_hcd_dev(c67x00), "create failed: %d\n",
++ ret);
+ urb->iso_frame_desc[urbp->cnt].actual_length = 0;
+ urb->iso_frame_desc[urbp->cnt].status = ret;
+ if (urbp->cnt + 1 == urb->number_of_packets)
diff --git a/usb-core-remove-config_usb_debug-usage.patch b/usb-core-remove-config_usb_debug-usage.patch
new file mode 100644
index 00000000000000..bebe95f9bdbf0c
--- /dev/null
+++ b/usb-core-remove-config_usb_debug-usage.patch
@@ -0,0 +1,99 @@
+From foo@baz Thu Dec 19 15:37:51 PST 2013
+Date: Thu, 19 Dec 2013 15:37:51 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] USB: core: remove CONFIG_USB_DEBUG usage
+
+CONFIG_USB_DEBUG is going away, so remove the few places in the USB core
+that relied on them.
+
+This means that we always now do the "debug" checks for every urb
+submitted, which is a good idea, as who knows how many driver bugs we
+have been ignoring when people forget to enable this option. Also, with
+the overall speed of USB, doing these extra checks should not cause any
+additional overhead.
+
+Also, no longer announce all devices being added to the system if
+CONFIG_USB_DEBUG is enabled, as it's not going to be around much longer.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/usb/core/Makefile | 2 --
+ drivers/usb/core/hub.c | 7 -------
+ drivers/usb/core/urb.c | 16 +++++++---------
+ 3 files changed, 7 insertions(+), 18 deletions(-)
+
+--- a/drivers/usb/core/Makefile
++++ b/drivers/usb/core/Makefile
+@@ -2,8 +2,6 @@
+ # Makefile for USB Core files and filesystem
+ #
+
+-ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
+-
+ usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
+ usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
+ usbcore-y += devio.o notify.o generic.o quirks.o devices.o
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -33,13 +33,6 @@
+
+ #include "hub.h"
+
+-/* if we are in debug mode, always announce new devices */
+-#ifdef DEBUG
+-#ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
+-#define CONFIG_USB_ANNOUNCE_NEW_DEVICES
+-#endif
+-#endif
+-
+ #define USB_VENDOR_GENESYS_LOGIC 0x05e3
+ #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
+
+--- a/drivers/usb/core/urb.c
++++ b/drivers/usb/core/urb.c
+@@ -325,10 +325,14 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
+ */
+ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
+ {
++ static int pipetypes[4] = {
++ PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
++ };
+ int xfertype, max;
+ struct usb_device *dev;
+ struct usb_host_endpoint *ep;
+ int is_out;
++ unsigned int allowed;
+
+ if (!urb || !urb->complete)
+ return -EINVAL;
+@@ -436,15 +440,10 @@ int usb_submit_urb(struct urb *urb, gfp_
+ if (urb->transfer_buffer_length > INT_MAX)
+ return -EMSGSIZE;
+
+-#ifdef DEBUG
+- /* stuff that drivers shouldn't do, but which shouldn't
++ /*
++ * stuff that drivers shouldn't do, but which shouldn't
+ * cause problems in HCDs if they get it wrong.
+ */
+- {
+- unsigned int allowed;
+- static int pipetypes[4] = {
+- PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
+- };
+
+ /* Check that the pipe's type matches the endpoint's type */
+ if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
+@@ -476,8 +475,7 @@ int usb_submit_urb(struct urb *urb, gfp_
+ if (allowed != urb->transfer_flags)
+ dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n",
+ urb->transfer_flags, allowed);
+- }
+-#endif
++
+ /*
+ * Force periodic transfer intervals to be legal values that are
+ * a power of two (so HCDs don't need to).
diff --git a/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch b/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
new file mode 100644
index 00000000000000..fdc75251c067b3
--- /dev/null
+++ b/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
@@ -0,0 +1,40 @@
+From foo@baz Thu Dec 19 15:36:20 PST 2013
+Date: Thu, 19 Dec 2013 15:36:20 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] USB: gadget: fix up some comments about CONFIG_USB_DEBUG
+
+These two gadget drivers said that their #endif was for
+CONFIG_USB_DEBUG, but they really were not, so fix them up to be
+correct.
+
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/acm_ms.c | 2 +-
+ drivers/usb/gadget/multi.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/acm_ms.c
++++ b/drivers/usb/gadget/acm_ms.c
+@@ -107,7 +107,7 @@ static unsigned int fsg_num_buffers = CO
+ */
+ #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
+
+-#endif /* CONFIG_USB_DEBUG */
++#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+ FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
+
+--- a/drivers/usb/gadget/multi.c
++++ b/drivers/usb/gadget/multi.c
+@@ -134,7 +134,7 @@ static unsigned int fsg_num_buffers = CO
+ */
+ #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
+
+-#endif /* CONFIG_USB_DEBUG */
++#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+ FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
+
diff --git a/usb_debug_removal.patch b/usb_debug_removal.patch
deleted file mode 100644
index 84c412c2e3a901..00000000000000
--- a/usb_debug_removal.patch
+++ /dev/null
@@ -1,181 +0,0 @@
----
- drivers/usb/core/hub.c | 7 -------
- drivers/usb/core/urb.c | 16 +++++++---------
- drivers/usb/gadget/acm_ms.c | 2 +-
- drivers/usb/gadget/multi.c | 2 +-
- drivers/watchdog/pcwd_usb.c | 40 +++++++++++-----------------------------
- 5 files changed, 20 insertions(+), 47 deletions(-)
-
---- a/drivers/usb/core/hub.c
-+++ b/drivers/usb/core/hub.c
-@@ -33,13 +33,6 @@
-
- #include "hub.h"
-
--/* if we are in debug mode, always announce new devices */
--#ifdef DEBUG
--#ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
--#define CONFIG_USB_ANNOUNCE_NEW_DEVICES
--#endif
--#endif
--
- #define USB_VENDOR_GENESYS_LOGIC 0x05e3
- #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
-
---- a/drivers/usb/core/urb.c
-+++ b/drivers/usb/core/urb.c
-@@ -325,10 +325,14 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
- */
- int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
- {
-+ static int pipetypes[4] = {
-+ PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
-+ };
- int xfertype, max;
- struct usb_device *dev;
- struct usb_host_endpoint *ep;
- int is_out;
-+ unsigned int allowed;
-
- if (!urb || !urb->complete)
- return -EINVAL;
-@@ -436,15 +440,10 @@ int usb_submit_urb(struct urb *urb, gfp_
- if (urb->transfer_buffer_length > INT_MAX)
- return -EMSGSIZE;
-
--#ifdef DEBUG
-- /* stuff that drivers shouldn't do, but which shouldn't
-+ /*
-+ * stuff that drivers shouldn't do, but which shouldn't
- * cause problems in HCDs if they get it wrong.
- */
-- {
-- unsigned int allowed;
-- static int pipetypes[4] = {
-- PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
-- };
-
- /* Check that the pipe's type matches the endpoint's type */
- if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
-@@ -476,8 +475,7 @@ int usb_submit_urb(struct urb *urb, gfp_
- if (allowed != urb->transfer_flags)
- dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n",
- urb->transfer_flags, allowed);
-- }
--#endif
-+
- /*
- * Force periodic transfer intervals to be legal values that are
- * a power of two (so HCDs don't need to).
---- a/drivers/usb/gadget/acm_ms.c
-+++ b/drivers/usb/gadget/acm_ms.c
-@@ -107,7 +107,7 @@ static unsigned int fsg_num_buffers = CO
- */
- #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
-
--#endif /* CONFIG_USB_DEBUG */
-+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
-
- FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
-
---- a/drivers/usb/gadget/multi.c
-+++ b/drivers/usb/gadget/multi.c
-@@ -134,7 +134,7 @@ static unsigned int fsg_num_buffers = CO
- */
- #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
-
--#endif /* CONFIG_USB_DEBUG */
-+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
-
- FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
-
---- a/drivers/watchdog/pcwd_usb.c
-+++ b/drivers/watchdog/pcwd_usb.c
-@@ -44,23 +44,6 @@
- #include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */
- #include <linux/uaccess.h> /* For copy_to_user/put_user/... */
-
--#ifdef CONFIG_USB_DEBUG
--static int debug = 1;
--#else
--static int debug;
--#endif
--
--/* Use our own dbg macro */
--
--#undef dbg
--#ifndef DEBUG
--#define DEBUG
--#endif
--#define dbg(format, ...) \
--do { \
-- if (debug) \
-- pr_debug(format "\n", ##__VA_ARGS__); \
--} while (0)
-
- /* Module and Version Information */
- #define DRIVER_VERSION "1.02"
-@@ -73,10 +56,6 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
- MODULE_DESCRIPTION(DRIVER_DESC);
- MODULE_LICENSE(DRIVER_LICENSE);
-
--/* Module Parameters */
--module_param(debug, int, 0);
--MODULE_PARM_DESC(debug, "Debug enabled or not");
--
- #define WATCHDOG_HEARTBEAT 0 /* default heartbeat =
- delay-time from dip-switches */
- static int heartbeat = WATCHDOG_HEARTBEAT;
-@@ -193,6 +172,7 @@ static void usb_pcwd_intr_done(struct ur
- struct usb_pcwd_private *usb_pcwd =
- (struct usb_pcwd_private *)urb->context;
- unsigned char *data = usb_pcwd->intr_buffer;
-+ struct device *dev = &usb_pcwd->interface->dev;
- int retval;
-
- switch (urb->status) {
-@@ -202,17 +182,17 @@ static void usb_pcwd_intr_done(struct ur
- case -ENOENT:
- case -ESHUTDOWN:
- /* this urb is terminated, clean up */
-- dbg("%s - urb shutting down with status: %d", __func__,
-- urb->status);
-+ dev_dbg(dev, "%s - urb shutting down with status: %d",
-+ __func__, urb->status);
- return;
- /* -EPIPE: should clear the halt */
- default: /* error */
-- dbg("%s - nonzero urb status received: %d", __func__,
-- urb->status);
-+ dev_dbg(dev, "%s - nonzero urb status received: %d",
-+ __func__, urb->status);
- goto resubmit;
- }
-
-- dbg("received following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
-+ dev_dbg(dev, "received following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
- data[0], data[1], data[2]);
-
- usb_pcwd->cmd_command = data[0];
-@@ -251,7 +231,8 @@ static int usb_pcwd_send_command(struct
- buf[2] = *lsb; /* Byte 2 = Data LSB */
- buf[3] = buf[4] = buf[5] = 0; /* All other bytes not used */
-
-- dbg("sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
-+ dev_dbg(&usb_pcwd->interface->dev,
-+ "sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
- buf[0], buf[1], buf[2]);
-
- atomic_set(&usb_pcwd->cmd_received, 0);
-@@ -260,8 +241,9 @@ static int usb_pcwd_send_command(struct
- HID_REQ_SET_REPORT, HID_DT_REPORT,
- 0x0200, usb_pcwd->interface_number, buf, 6,
- USB_COMMAND_TIMEOUT) != 6) {
-- dbg("usb_pcwd_send_command: error in usb_control_msg for "
-- "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb);
-+ dev_dbg(&usb_pcwd->interface->dev,
-+ "usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n",
-+ cmd, *msb, *lsb);
- }
- /* wait till the usb card processed the command,
- * with a max. timeout of USB_COMMAND_TIMEOUT */