]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 16:56:57 +0000 (09:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 16:56:57 +0000 (09:56 -0700)
added patches:
usb-option-add-more-yuga-device-ids.patch
usb-option-add-vodafone-huawei-k5005-support.patch
usb-option-fix-memory-leak.patch
usb-option-fix-port-data-abuse.patch
usb-option-updated-huawei-k4605-has-better-id.patch

queue-3.0/series
queue-3.0/usb-option-add-more-yuga-device-ids.patch [new file with mode: 0644]
queue-3.0/usb-option-add-vodafone-huawei-k5005-support.patch [new file with mode: 0644]
queue-3.0/usb-option-fix-memory-leak.patch [new file with mode: 0644]
queue-3.0/usb-option-fix-port-data-abuse.patch [new file with mode: 0644]
queue-3.0/usb-option-updated-huawei-k4605-has-better-id.patch [new file with mode: 0644]

index 567fd424393c4fa9ca3dea49070233436bfc134a..3c9b1da300b1cd4ee511786235301ed190dbfbb4 100644 (file)
@@ -1,3 +1,8 @@
 arm-i.mx-imx21ads-fix-overlapping-static-i-o-mappings.patch
 xen-setup-filter-aperfmperf-cpuid-feature-out.patch
 nfsv4.1-fix-a-request-leak-on-the-back-channel.patch
+usb-option-add-vodafone-huawei-k5005-support.patch
+usb-option-updated-huawei-k4605-has-better-id.patch
+usb-option-add-more-yuga-device-ids.patch
+usb-option-fix-memory-leak.patch
+usb-option-fix-port-data-abuse.patch
diff --git a/queue-3.0/usb-option-add-more-yuga-device-ids.patch b/queue-3.0/usb-option-add-more-yuga-device-ids.patch
new file mode 100644 (file)
index 0000000..8de4e6c
--- /dev/null
@@ -0,0 +1,90 @@
+From 0ef0be15fd2564767f114c249fc4af704d8e16f4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E8=AF=B4=E4=B8=8D=E5=BE=97?= <gavin.kx@qq.com>
+Date: Mon, 28 May 2012 21:31:29 +0800
+Subject: USB: option: add more YUGA device ids
+
+From: =?UTF-8?q?=E8=AF=B4=E4=B8=8D=E5=BE=97?= <gavin.kx@qq.com>
+
+commit 0ef0be15fd2564767f114c249fc4af704d8e16f4 upstream.
+
+Signed-off-by: gavin zhu <gavin.zhu@qq.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |   42 ++++++++++++++++++++++++++----------------
+ 1 file changed, 26 insertions(+), 16 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -426,7 +426,7 @@ static void option_instat_callback(struc
+ #define SAMSUNG_VENDOR_ID                       0x04e8
+ #define SAMSUNG_PRODUCT_GT_B3730                0x6889
+-/* YUGA products  www.yuga-info.com*/
++/* YUGA products  www.yuga-info.com gavin.kx@qq.com */
+ #define YUGA_VENDOR_ID                                0x257A
+ #define YUGA_PRODUCT_CEM600                   0x1601
+ #define YUGA_PRODUCT_CEM610                   0x1602
+@@ -443,6 +443,8 @@ static void option_instat_callback(struc
+ #define YUGA_PRODUCT_CEU516                   0x160C
+ #define YUGA_PRODUCT_CEU528                   0x160D
+ #define YUGA_PRODUCT_CEU526                   0x160F
++#define YUGA_PRODUCT_CEU881                   0x161F
++#define YUGA_PRODUCT_CEU882                   0x162F
+ #define YUGA_PRODUCT_CWM600                   0x2601
+ #define YUGA_PRODUCT_CWM610                   0x2602
+@@ -458,23 +460,26 @@ static void option_instat_callback(struc
+ #define YUGA_PRODUCT_CWU518                   0x260B
+ #define YUGA_PRODUCT_CWU516                   0x260C
+ #define YUGA_PRODUCT_CWU528                   0x260D
++#define YUGA_PRODUCT_CWU581                   0x260E
+ #define YUGA_PRODUCT_CWU526                   0x260F
++#define YUGA_PRODUCT_CWU582                   0x261F
++#define YUGA_PRODUCT_CWU583                   0x262F
+-#define YUGA_PRODUCT_CLM600                   0x2601
+-#define YUGA_PRODUCT_CLM610                   0x2602
+-#define YUGA_PRODUCT_CLM500                   0x2603
+-#define YUGA_PRODUCT_CLM510                   0x2604
+-#define YUGA_PRODUCT_CLM800                   0x2605
+-#define YUGA_PRODUCT_CLM900                   0x2606
+-
+-#define YUGA_PRODUCT_CLU718                   0x2607
+-#define YUGA_PRODUCT_CLU716                   0x2608
+-#define YUGA_PRODUCT_CLU728                   0x2609
+-#define YUGA_PRODUCT_CLU726                   0x260A
+-#define YUGA_PRODUCT_CLU518                   0x260B
+-#define YUGA_PRODUCT_CLU516                   0x260C
+-#define YUGA_PRODUCT_CLU528                   0x260D
+-#define YUGA_PRODUCT_CLU526                   0x260F
++#define YUGA_PRODUCT_CLM600                   0x3601
++#define YUGA_PRODUCT_CLM610                   0x3602
++#define YUGA_PRODUCT_CLM500                   0x3603
++#define YUGA_PRODUCT_CLM510                   0x3604
++#define YUGA_PRODUCT_CLM800                   0x3605
++#define YUGA_PRODUCT_CLM900                   0x3606
++
++#define YUGA_PRODUCT_CLU718                   0x3607
++#define YUGA_PRODUCT_CLU716                   0x3608
++#define YUGA_PRODUCT_CLU728                   0x3609
++#define YUGA_PRODUCT_CLU726                   0x360A
++#define YUGA_PRODUCT_CLU518                   0x360B
++#define YUGA_PRODUCT_CLU516                   0x360C
++#define YUGA_PRODUCT_CLU528                   0x360D
++#define YUGA_PRODUCT_CLU526                   0x360F
+ /* Viettel products */
+ #define VIETTEL_VENDOR_ID                     0x2262
+@@ -1213,6 +1218,11 @@ static const struct usb_device_id option
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) },
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
++      { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU881) },
++      { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU882) },
++      { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) },
++      { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) },
++      { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) },
+       { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
+       { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */
diff --git a/queue-3.0/usb-option-add-vodafone-huawei-k5005-support.patch b/queue-3.0/usb-option-add-vodafone-huawei-k5005-support.patch
new file mode 100644 (file)
index 0000000..37eb7ec
--- /dev/null
@@ -0,0 +1,40 @@
+From 4cbbb039a9719fb3bba73d255c6a95bc6dc6428b Mon Sep 17 00:00:00 2001
+From: Bjørn Mork <bjorn@mork.no>
+Date: Sat, 19 May 2012 19:20:50 +0200
+Subject: USB: option: Add Vodafone/Huawei K5005 support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 4cbbb039a9719fb3bba73d255c6a95bc6dc6428b upstream.
+
+Tested-by: Thomas Schäfer <tschaefer@t-online.de>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -150,6 +150,7 @@ static void option_instat_callback(struc
+ #define HUAWEI_PRODUCT_E14AC                  0x14AC
+ #define HUAWEI_PRODUCT_K3806                  0x14AE
+ #define HUAWEI_PRODUCT_K4605                  0x14C6
++#define HUAWEI_PRODUCT_K5005                  0x14C8
+ #define HUAWEI_PRODUCT_K3770                  0x14C9
+ #define HUAWEI_PRODUCT_K3771                  0x14CA
+ #define HUAWEI_PRODUCT_K4510                  0x14CB
+@@ -666,6 +667,9 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
+               .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
diff --git a/queue-3.0/usb-option-fix-memory-leak.patch b/queue-3.0/usb-option-fix-memory-leak.patch
new file mode 100644 (file)
index 0000000..eec184e
--- /dev/null
@@ -0,0 +1,55 @@
+From b9c3aab315b51f81649a0d737c4c73783fbd8de0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 29 May 2012 18:22:48 +0200
+Subject: USB: option: fix memory leak
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit b9c3aab315b51f81649a0d737c4c73783fbd8de0 upstream.
+
+Fix memory leak introduced by commit 383cedc3bb435de7a2 ("USB: serial:
+full autosuspend support for the option driver") which allocates
+usb-serial data but never frees it.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -47,6 +47,7 @@
+ /* Function prototypes */
+ static int  option_probe(struct usb_serial *serial,
+                       const struct usb_device_id *id);
++static void option_release(struct usb_serial *serial);
+ static int option_send_setup(struct usb_serial_port *port);
+ static void option_instat_callback(struct urb *urb);
+@@ -1273,7 +1274,7 @@ static struct usb_serial_driver option_1
+       .ioctl             = usb_wwan_ioctl,
+       .attach            = usb_wwan_startup,
+       .disconnect        = usb_wwan_disconnect,
+-      .release           = usb_wwan_release,
++      .release           = option_release,
+       .read_int_callback = option_instat_callback,
+ #ifdef CONFIG_PM
+       .suspend           = usb_wwan_suspend,
+@@ -1409,6 +1410,15 @@ static int option_probe(struct usb_seria
+       return 0;
+ }
++static void option_release(struct usb_serial *serial)
++{
++      struct usb_wwan_intf_private *priv = usb_get_serial_data(serial);
++
++      usb_wwan_release(serial);
++
++      kfree(priv);
++}
++
+ static void option_instat_callback(struct urb *urb)
+ {
+       int err;
diff --git a/queue-3.0/usb-option-fix-port-data-abuse.patch b/queue-3.0/usb-option-fix-port-data-abuse.patch
new file mode 100644 (file)
index 0000000..3ff98c2
--- /dev/null
@@ -0,0 +1,77 @@
+From 4273f9878b0a8271df055e3c8f2e7f08c6a4a2f4 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 29 May 2012 17:57:52 +0200
+Subject: USB: option: fix port-data abuse
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 4273f9878b0a8271df055e3c8f2e7f08c6a4a2f4 upstream.
+
+Commit 8b4c6a3ab596961b78465 ("USB: option: Use generic USB wwan code")
+moved option port-data allocation to usb_wwan_startup but still cast the
+port data to the old struct...
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |   34 +++-------------------------------
+ 1 file changed, 3 insertions(+), 31 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1284,35 +1284,6 @@ static struct usb_serial_driver option_1
+ static int debug;
+-/* per port private data */
+-
+-#define N_IN_URB 4
+-#define N_OUT_URB 4
+-#define IN_BUFLEN 4096
+-#define OUT_BUFLEN 4096
+-
+-struct option_port_private {
+-      /* Input endpoints and buffer for this port */
+-      struct urb *in_urbs[N_IN_URB];
+-      u8 *in_buffer[N_IN_URB];
+-      /* Output endpoints and buffer for this port */
+-      struct urb *out_urbs[N_OUT_URB];
+-      u8 *out_buffer[N_OUT_URB];
+-      unsigned long out_busy;         /* Bit vector of URBs in use */
+-      int opened;
+-      struct usb_anchor delayed;
+-
+-      /* Settings for the port */
+-      int rts_state;  /* Handshaking pins (outputs) */
+-      int dtr_state;
+-      int cts_state;  /* Handshaking pins (inputs) */
+-      int dsr_state;
+-      int dcd_state;
+-      int ri_state;
+-
+-      unsigned long tx_start_time[N_OUT_URB];
+-};
+-
+ /* Functions used by new usb-serial code. */
+ static int __init option_init(void)
+ {
+@@ -1424,7 +1395,8 @@ static void option_instat_callback(struc
+       int err;
+       int status = urb->status;
+       struct usb_serial_port *port =  urb->context;
+-      struct option_port_private *portdata = usb_get_serial_port_data(port);
++      struct usb_wwan_port_private *portdata =
++                                      usb_get_serial_port_data(port);
+       dbg("%s", __func__);
+       dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
+@@ -1485,7 +1457,7 @@ static int option_send_setup(struct usb_
+       struct usb_serial *serial = port->serial;
+       struct usb_wwan_intf_private *intfdata =
+               (struct usb_wwan_intf_private *) serial->private;
+-      struct option_port_private *portdata;
++      struct usb_wwan_port_private *portdata;
+       int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
+       int val = 0;
+       dbg("%s", __func__);
diff --git a/queue-3.0/usb-option-updated-huawei-k4605-has-better-id.patch b/queue-3.0/usb-option-updated-huawei-k4605-has-better-id.patch
new file mode 100644 (file)
index 0000000..8d747f6
--- /dev/null
@@ -0,0 +1,32 @@
+From 42ca7da1c2363dbef4ba1b6917c4c02274b6a5e2 Mon Sep 17 00:00:00 2001
+From: Andrew Bird <ajb@spheresystems.co.uk>
+Date: Mon, 28 May 2012 12:43:06 +0100
+Subject: USB: option: Updated Huawei K4605 has better id
+
+From: Andrew Bird <ajb@spheresystems.co.uk>
+
+commit 42ca7da1c2363dbef4ba1b6917c4c02274b6a5e2 upstream.
+
+Later firmwares for this device now have proper subclass and
+protocol info so we can identify it nicely without needing to use
+the blacklist. I'm not removing the old 0xff matching as there
+may be devices in the field that still need that.
+
+Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -667,6 +667,8 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
+               .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) },