aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-03-11 14:09:49 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-11 14:09:49 -0700
commit1c126d3c29611c11088b6ca5ba35379f71a4c716 (patch)
treed51834290066a6b91c90c9bbfd244b5a8e5ed09c /usb
parent3e08ba9f88c368d97e948bc692638d12101ec6fd (diff)
downloadpatches-1c126d3c29611c11088b6ca5ba35379f71a4c716.tar.gz
more patches
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch30
-rw-r--r--usb/usb-ipaq-handle-4-endpoint-devices.patch100
-rw-r--r--usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch31
-rw-r--r--usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch29
-rw-r--r--usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch29
-rw-r--r--usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch28
-rw-r--r--usb/usb-s3c-move-usb-control.h-to-platform-include.patch140
-rw-r--r--usb/usb-suspend-resume-support-for-option-driver.patch14
8 files changed, 394 insertions, 7 deletions
diff --git a/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch b/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch
new file mode 100644
index 00000000000000..ced37423fbc05f
--- /dev/null
+++ b/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch
@@ -0,0 +1,30 @@
+From hannes@hanneseder.net Wed Mar 11 11:39:10 2009
+From: Hannes Eder <hannes@hanneseder.net>
+Date: Fri, 27 Feb 2009 02:04:31 +0100
+Subject: USB: host: fix sparse warning: Using plain integer as NULL pointer
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Message-ID: <154e089b0902261704j8dba825q59411db576a157e8@mail.gmail.com>
+
+From: Hannes Eder <hannes@hanneseder.net>
+
+Fix this sparse warning:
+�drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer
+
+Signed-off-by: Hannes Eder <hannes@hanneseder.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/oxu210hp-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/oxu210hp-hcd.c
++++ b/drivers/usb/host/oxu210hp-hcd.c
+@@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd
+ oxu->urb_len = 0;
+
+ /* FIMXE */
+- hcd->self.controller->dma_mask = 0UL;
++ hcd->self.controller->dma_mask = NULL;
+
+ if (oxu->is_otg) {
+ oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;
diff --git a/usb/usb-ipaq-handle-4-endpoint-devices.patch b/usb/usb-ipaq-handle-4-endpoint-devices.patch
new file mode 100644
index 00000000000000..54cc2108b0e6f1
--- /dev/null
+++ b/usb/usb-ipaq-handle-4-endpoint-devices.patch
@@ -0,0 +1,100 @@
+From mark@mpellis.org.uk Wed Mar 11 13:49:33 2009
+From: Mark Ellis <mark@mpellis.org.uk>
+Date: Mon, 9 Mar 2009 22:24:29 +0000
+Subject: USB: ipaq: handle 4 endpoint devices
+To: Greg KH <greg@kroah.com>
+Message-ID: <1236637469.6741.21.camel@mark01>
+
+
+From: Mark Ellis <mark@mpellis.org.uk>
+
+The ipaq driver currently enforces one port on all devices. This
+is correct for 2 and 3 endpoint devices, but with 4 endpoint devices
+meaningful communication occurs on the second pair.
+
+This patch allows 2 ports for 4 endpoint devices.
+
+Signed-off-by: Mark Ellis <mark@mpellis.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ipaq.c | 43 +++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 37 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/serial/ipaq.c
++++ b/drivers/usb/serial/ipaq.c
+@@ -78,6 +78,7 @@ static int ipaq_open(struct tty_struct
+ struct usb_serial_port *port, struct file *filp);
+ static void ipaq_close(struct tty_struct *tty,
+ struct usb_serial_port *port, struct file *filp);
++static int ipaq_calc_num_ports(struct usb_serial *serial);
+ static int ipaq_startup(struct usb_serial *serial);
+ static void ipaq_shutdown(struct usb_serial *serial);
+ static int ipaq_write(struct tty_struct *tty, struct usb_serial_port *port,
+@@ -572,15 +573,10 @@ static struct usb_serial_driver ipaq_dev
+ .description = "PocketPC PDA",
+ .usb_driver = &ipaq_driver,
+ .id_table = ipaq_id_table,
+- /*
+- * some devices have an extra endpoint, which
+- * must be ignored as it would make the core
+- * create a second port which oopses when used
+- */
+- .num_ports = 1,
+ .open = ipaq_open,
+ .close = ipaq_close,
+ .attach = ipaq_startup,
++ .calc_num_ports = ipaq_calc_num_ports,
+ .shutdown = ipaq_shutdown,
+ .write = ipaq_write,
+ .write_room = ipaq_write_room,
+@@ -956,14 +952,49 @@ static void ipaq_destroy_lists(struct us
+ }
+
+
++static int ipaq_calc_num_ports(struct usb_serial *serial)
++{
++ /*
++ * some devices have 3 endpoints, the 3rd of which
++ * must be ignored as it would make the core
++ * create a second port which oopses when used
++ */
++ int ipaq_num_ports = 1;
++
++ dbg("%s - numberofendpoints: %d", __FUNCTION__,
++ (int)serial->interface->cur_altsetting->desc.bNumEndpoints);
++
++ /*
++ * a few devices have 4 endpoints, seemingly Yakuma devices,
++ * and we need the second pair, so let them have 2 ports
++ *
++ * TODO: can we drop port 1 ?
++ */
++ if (serial->interface->cur_altsetting->desc.bNumEndpoints > 3) {
++ ipaq_num_ports = 2;
++ }
++
++ return ipaq_num_ports;
++}
++
++
+ static int ipaq_startup(struct usb_serial *serial)
+ {
+ dbg("%s", __func__);
+ if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
++ /*
++ * FIXME: HP iPaq rx3715, possibly others, have 1 config that
++ * is labeled as 2
++ */
++
+ dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
+ serial->dev->actconfig->desc.bConfigurationValue);
+ return -ENODEV;
+ }
++
++ dbg("%s - iPAQ module configured for %d ports",
++ __FUNCTION__, serial->num_ports);
++
+ return usb_reset_configuration(serial->dev);
+ }
+
diff --git a/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch b/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch
new file mode 100644
index 00000000000000..ee3e7a2e431596
--- /dev/null
+++ b/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch
@@ -0,0 +1,31 @@
+From ben@simtec.co.uk Wed Mar 11 13:47:38 2009
+From: Ben Dooks <ben@simtec.co.uk>
+Date: Sat, 07 Mar 2009 11:44:10 +0000
+Subject: USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
+To: linux-usb@vger.kernel.org
+Cc: dbrownell@users.sourceforge.net
+Message-ID: <20090307114409.944672654@fluff.org.uk>
+
+
+The ohci-s3c2410.c glue supports both CONFIG_ARCH_S3C2410 and
+CONFIG_ARCH_S3C64XX so add it to the build of ohci-s3c2410.c
+
+Signed-off-by: Ben Dooks <ben@simtec.co.uk>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -997,7 +997,7 @@ MODULE_LICENSE ("GPL");
+ #define SA1111_DRIVER ohci_hcd_sa1111_driver
+ #endif
+
+-#ifdef CONFIG_ARCH_S3C2410
++#if defined(CONFIG_ARCH_S3C2410) || defined(CONFIG_ARCH_S3C64XX)
+ #include "ohci-s3c2410.c"
+ #define PLATFORM_DRIVER ohci_hcd_s3c2410_driver
+ #endif
diff --git a/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch b/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch
new file mode 100644
index 00000000000000..2e54f39621e431
--- /dev/null
+++ b/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch
@@ -0,0 +1,29 @@
+From ben@simtec.co.uk Wed Mar 11 11:38:37 2009
+From: Ben Dooks <ben@simtec.co.uk>
+Date: Thu, 26 Feb 2009 23:03:15 +0000
+Subject: USB: ohci-s3c2410: fix name of bus clock
+Cc: dbrownell@users.sourceforge.net
+Message-ID: <20090226230314.880253822@fluff.org.uk>
+
+
+The USB bus clock is usb-bus-host, so print the correct name in the
+dev_err() statement if we cannot find it.
+
+Signed-off-by: Ben Dooks <ben@simtec.co.uk>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+
+---
+ drivers/usb/host/ohci-s3c2410.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-s3c2410.c
++++ b/drivers/usb/host/ohci-s3c2410.c
+@@ -371,7 +371,7 @@ static int usb_hcd_s3c2410_probe (const
+
+ usb_clk = clk_get(&dev->dev, "usb-bus-host");
+ if (IS_ERR(usb_clk)) {
+- dev_err(&dev->dev, "cannot get usb-host clock\n");
++ dev_err(&dev->dev, "cannot get usb-bus-host clock\n");
+ retval = -ENOENT;
+ goto err_clk;
+ }
diff --git a/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch b/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch
new file mode 100644
index 00000000000000..87350a13eb1ba1
--- /dev/null
+++ b/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch
@@ -0,0 +1,29 @@
+From ben@simtec.co.uk Wed Mar 11 11:37:10 2009
+From: Ben Dooks <ben@simtec.co.uk>
+Date: Thu, 26 Feb 2009 23:02:19 +0000
+Subject: USB: ohci-s3c2410: remove <mach/hardware.h> include
+Cc: dbrownell@users.sourceforge.net, Ben Dooks <ben-linux@fluff.org>
+Message-ID: <20090226230219.040186835@fluff.org.uk>
+
+
+Remove the include of <mach/hardware.h>, as no definitions
+from it are used by the OHCI driver.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-s3c2410.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-s3c2410.c
++++ b/drivers/usb/host/ohci-s3c2410.c
+@@ -22,7 +22,6 @@
+ #include <linux/platform_device.h>
+ #include <linux/clk.h>
+
+-#include <mach/hardware.h>
+ #include <mach/usb-control.h>
+
+ #define valid_port(idx) ((idx) == 1 || (idx) == 2)
diff --git a/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch b/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch
new file mode 100644
index 00000000000000..41a33389074024
--- /dev/null
+++ b/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch
@@ -0,0 +1,28 @@
+From dev@capelis.dj Wed Mar 11 13:40:12 2009
+From: "D.J. Capelis" <dev@capelis.dj>
+Date: Wed, 04 Mar 2009 10:27:52 -0800
+Subject: USB: pedantic: spelling correction in comment for ch9.h
+To: Greg K-H <gregkh@suse.de>
+Message-ID: <1236191272.19965.51.camel@aes.capelis.dj>
+
+
+Just noticed this during a grep, figured I might as well send it in.
+
+From: D.J. Capelis <dev@capelis.dj>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/usb/ch9.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/usb/ch9.h
++++ b/include/linux/usb/ch9.h
+@@ -102,7 +102,7 @@
+ #define USB_REQ_LOOPBACK_DATA_READ 0x16
+ #define USB_REQ_SET_INTERFACE_DS 0x17
+
+-/* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command,
++/* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command,
+ * used by hubs to put ports into a new L1 suspend state, except that it
+ * forgot to define its number ...
+ */
diff --git a/usb/usb-s3c-move-usb-control.h-to-platform-include.patch b/usb/usb-s3c-move-usb-control.h-to-platform-include.patch
new file mode 100644
index 00000000000000..21cc3fe5056a69
--- /dev/null
+++ b/usb/usb-s3c-move-usb-control.h-to-platform-include.patch
@@ -0,0 +1,140 @@
+From ben@simtec.co.uk Wed Mar 11 13:48:12 2009
+From: Ben Dooks <ben@simtec.co.uk>
+Date: Sat, 07 Mar 2009 11:44:21 +0000
+Subject: USB: S3C: Move usb-control.h to platform include
+Cc: dbrownell@users.sourceforge.net
+Message-ID: <20090307114421.098974047@fluff.org.uk>
+
+
+The usb-control.h is needed by ohci-s3c2410.c for both S3C24XX and S3C64XX
+architectures, so move it to <plat/usb-control.h>
+
+Signed-off-by: Ben Dooks <ben@simtec.co.uk>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-s3c2410/include/mach/usb-control.h | 41 -----------------------
+ arch/arm/mach-s3c2410/usb-simtec.c | 3 +
+ arch/arm/plat-s3c/include/plat/usb-control.h | 41 +++++++++++++++++++++++
+ drivers/usb/host/ohci-s3c2410.c | 3 -
+ 4 files changed, 44 insertions(+), 44 deletions(-)
+
+--- a/arch/arm/mach-s3c2410/include/mach/usb-control.h
++++ /dev/null
+@@ -1,41 +0,0 @@
+-/* arch/arm/mach-s3c2410/include/mach/usb-control.h
+- *
+- * Copyright (c) 2004 Simtec Electronics
+- * Ben Dooks <ben@simtec.co.uk>
+- *
+- * S3C2410 - usb port information
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+-*/
+-
+-#ifndef __ASM_ARCH_USBCONTROL_H
+-#define __ASM_ARCH_USBCONTROL_H "arch/arm/mach-s3c2410/include/mach/usb-control.h"
+-
+-#define S3C_HCDFLG_USED (1)
+-
+-struct s3c2410_hcd_port {
+- unsigned char flags;
+- unsigned char power;
+- unsigned char oc_status;
+- unsigned char oc_changed;
+-};
+-
+-struct s3c2410_hcd_info {
+- struct usb_hcd *hcd;
+- struct s3c2410_hcd_port port[2];
+-
+- void (*power_control)(int port, int to);
+- void (*enable_oc)(struct s3c2410_hcd_info *, int on);
+- void (*report_oc)(struct s3c2410_hcd_info *, int ports);
+-};
+-
+-static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
+-{
+- if (info->report_oc != NULL) {
+- (info->report_oc)(info, ports);
+- }
+-}
+-
+-#endif /*__ASM_ARCH_USBCONTROL_H */
+--- a/arch/arm/mach-s3c2410/usb-simtec.c
++++ b/arch/arm/mach-s3c2410/usb-simtec.c
+@@ -29,13 +29,14 @@
+
+ #include <mach/bast-map.h>
+ #include <mach/bast-irq.h>
+-#include <mach/usb-control.h>
+ #include <mach/regs-gpio.h>
+
+ #include <mach/hardware.h>
+ #include <asm/irq.h>
+
++#include <plat/usb-control.h>
+ #include <plat/devs.h>
++
+ #include "usb-simtec.h"
+
+ /* control power and monitor over-current events on various Simtec
+--- /dev/null
++++ b/arch/arm/plat-s3c/include/plat/usb-control.h
+@@ -0,0 +1,41 @@
++/* arch/arm/plat-s3c/include/plat/usb-control.h
++ *
++ * Copyright (c) 2004 Simtec Electronics
++ * Ben Dooks <ben@simtec.co.uk>
++ *
++ * S3C - USB host port information
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++*/
++
++#ifndef __ASM_ARCH_USBCONTROL_H
++#define __ASM_ARCH_USBCONTROL_H
++
++#define S3C_HCDFLG_USED (1)
++
++struct s3c2410_hcd_port {
++ unsigned char flags;
++ unsigned char power;
++ unsigned char oc_status;
++ unsigned char oc_changed;
++};
++
++struct s3c2410_hcd_info {
++ struct usb_hcd *hcd;
++ struct s3c2410_hcd_port port[2];
++
++ void (*power_control)(int port, int to);
++ void (*enable_oc)(struct s3c2410_hcd_info *, int on);
++ void (*report_oc)(struct s3c2410_hcd_info *, int ports);
++};
++
++static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
++{
++ if (info->report_oc != NULL) {
++ (info->report_oc)(info, ports);
++ }
++}
++
++#endif /*__ASM_ARCH_USBCONTROL_H */
+--- a/drivers/usb/host/ohci-s3c2410.c
++++ b/drivers/usb/host/ohci-s3c2410.c
+@@ -21,8 +21,7 @@
+
+ #include <linux/platform_device.h>
+ #include <linux/clk.h>
+-
+-#include <mach/usb-control.h>
++#include <plat/usb-control.h>
+
+ #define valid_port(idx) ((idx) == 1 || (idx) == 2)
+
diff --git a/usb/usb-suspend-resume-support-for-option-driver.patch b/usb/usb-suspend-resume-support-for-option-driver.patch
index a262d03fd73c5e..78a17aba8b3a1d 100644
--- a/usb/usb-suspend-resume-support-for-option-driver.patch
+++ b/usb/usb-suspend-resume-support-for-option-driver.patch
@@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Vendor and product IDs */
#define OPTION_VENDOR_ID 0x0AF0
-@@ -525,6 +527,8 @@ static struct usb_driver option_driver =
+@@ -527,6 +529,8 @@ static struct usb_driver option_driver =
.name = "option",
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
@@ -42,7 +42,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
.id_table = option_ids,
.no_dynamic_id = 1,
};
-@@ -553,6 +557,8 @@ static struct usb_serial_driver option_1
+@@ -555,6 +559,8 @@ static struct usb_serial_driver option_1
.attach = option_startup,
.shutdown = option_shutdown,
.read_int_callback = option_instat_callback,
@@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
};
static int debug;
-@@ -823,10 +829,10 @@ static void option_instat_callback(struc
+@@ -825,10 +831,10 @@ static void option_instat_callback(struc
req_pkt->bRequestType, req_pkt->bRequest);
}
} else
@@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->dev = serial->dev;
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err)
-@@ -845,7 +851,6 @@ static int option_write_room(struct tty_
+@@ -847,7 +853,6 @@ static int option_write_room(struct tty_
portdata = usb_get_serial_port_data(port);
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < N_OUT_URB; i++) {
this_urb = portdata->out_urbs[i];
if (this_urb && !test_bit(i, &portdata->out_busy))
-@@ -1107,14 +1112,12 @@ bail_out_error:
+@@ -1109,14 +1114,12 @@ bail_out_error:
return 1;
}
@@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Stop reading/writing urbs */
for (i = 0; i < serial->num_ports; ++i) {
port = serial->port[i];
-@@ -1124,6 +1127,17 @@ static void option_shutdown(struct usb_s
+@@ -1126,6 +1129,17 @@ static void option_shutdown(struct usb_s
for (j = 0; j < N_OUT_URB; j++)
usb_kill_urb(portdata->out_urbs[j]);
}
@@ -106,7 +106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Now free them */
for (i = 0; i < serial->num_ports; ++i) {
-@@ -1154,6 +1168,66 @@ static void option_shutdown(struct usb_s
+@@ -1156,6 +1170,66 @@ static void option_shutdown(struct usb_s
}
}