]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 23:02:44 +0000 (16:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 23:02:44 +0000 (16:02 -0700)
added patches:
acpi-video-ignore-bios-initial-backlight-value-for-hp-m4.patch
acpi-video-ignore-bios-initial-backlight-value-for-hp-pavilion-g6.patch
alsa-usb-audio-apply-logitech-quickcam-pro-9000-quirk-only-to-audio-iface.patch
alsa-usb-audio-fix-invalid-volume-resolution-on-logitech-hd-webcam-c270.patch
alsa-usb-audio-fix-roland-cakewalk-um-3g-support.patch
usb-ark3116-fix-control-message-timeout.patch
usb-iuu_phoenix-fix-bulk-message-timeout.patch
usb-keyspan-fix-bogus-array-index.patch
usb-mos7720-fix-dma-to-stack.patch
usb-mos7720-fix-hardware-flow-control.patch
usb-mos7720-fix-message-timeouts.patch
usb-option-blacklist-network-interface-on-huawei-e1820.patch
usb-revert-periodic-scheduling-bugfix.patch
usb-serial-cypress_m8-enable-frwd-dongle-hidcom-device.patch
usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch
usb-visor-fix-initialisation-of-treo-kyocera-devices.patch
usb-whiteheat-fix-broken-port-configuration.patch
xhci-correct-comp_mode_recovery_timer-on-return-from-hibernate.patch
xhci-fix-list-access-before-init.patch
xhci-mem-init-list-heads-at-the-beginning-of-init.patch

21 files changed:
queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-m4.patch [new file with mode: 0644]
queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-pavilion-g6.patch [new file with mode: 0644]
queue-3.4/alsa-usb-audio-apply-logitech-quickcam-pro-9000-quirk-only-to-audio-iface.patch [new file with mode: 0644]
queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-on-logitech-hd-webcam-c270.patch [new file with mode: 0644]
queue-3.4/alsa-usb-audio-fix-roland-cakewalk-um-3g-support.patch [new file with mode: 0644]
queue-3.4/series [new file with mode: 0644]
queue-3.4/usb-ark3116-fix-control-message-timeout.patch [new file with mode: 0644]
queue-3.4/usb-iuu_phoenix-fix-bulk-message-timeout.patch [new file with mode: 0644]
queue-3.4/usb-keyspan-fix-bogus-array-index.patch [new file with mode: 0644]
queue-3.4/usb-mos7720-fix-dma-to-stack.patch [new file with mode: 0644]
queue-3.4/usb-mos7720-fix-hardware-flow-control.patch [new file with mode: 0644]
queue-3.4/usb-mos7720-fix-message-timeouts.patch [new file with mode: 0644]
queue-3.4/usb-option-blacklist-network-interface-on-huawei-e1820.patch [new file with mode: 0644]
queue-3.4/usb-revert-periodic-scheduling-bugfix.patch [new file with mode: 0644]
queue-3.4/usb-serial-cypress_m8-enable-frwd-dongle-hidcom-device.patch [new file with mode: 0644]
queue-3.4/usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch [new file with mode: 0644]
queue-3.4/usb-visor-fix-initialisation-of-treo-kyocera-devices.patch [new file with mode: 0644]
queue-3.4/usb-whiteheat-fix-broken-port-configuration.patch [new file with mode: 0644]
queue-3.4/xhci-correct-comp_mode_recovery_timer-on-return-from-hibernate.patch [new file with mode: 0644]
queue-3.4/xhci-fix-list-access-before-init.patch [new file with mode: 0644]
queue-3.4/xhci-mem-init-list-heads-at-the-beginning-of-init.patch [new file with mode: 0644]

diff --git a/queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-m4.patch b/queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-m4.patch
new file mode 100644 (file)
index 0000000..7a352c7
--- /dev/null
@@ -0,0 +1,39 @@
+From fedbe9bc6fd3e14b1ffbb3dac407777ac4a3650c Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@canonical.com>
+Date: Tue, 28 May 2013 02:05:09 +0000
+Subject: ACPI / video: ignore BIOS initial backlight value for HP m4
+
+From: Alex Hung <alex.hung@canonical.com>
+
+commit fedbe9bc6fd3e14b1ffbb3dac407777ac4a3650c upstream.
+
+On HP m4 lapops, BIOS reports minimum backlight on boot and
+causes backlight to dim completely. This ignores the initial backlight
+values and set to max brightness.
+
+References: https://bugs.launchpad.net/bugs/1184501
+Signed-off-by: Alex Hung <alex.hung@canonical.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/video.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -447,6 +447,14 @@ static struct dmi_system_id video_dmi_ta
+               DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
+               },
+       },
++      {
++       .callback = video_ignore_initial_backlight,
++       .ident = "HP Pavilion m4",
++       .matches = {
++              DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
++              DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
++              },
++      },
+       {}
+ };
diff --git a/queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-pavilion-g6.patch b/queue-3.4/acpi-video-ignore-bios-initial-backlight-value-for-hp-pavilion-g6.patch
new file mode 100644 (file)
index 0000000..c30d4fb
--- /dev/null
@@ -0,0 +1,40 @@
+From 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3 Mon Sep 17 00:00:00 2001
+From: Ash Willis <ashwillis.kernel@gmail.com>
+Date: Wed, 29 May 2013 01:27:59 +0000
+Subject: ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
+
+From: Ash Willis <ashwillis.kernel@gmail.com>
+
+commit 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3 upstream.
+
+This patch addresses kernel bug 56661. BIOS reports an incorrect
+backlight value, causing the driver to switch off the backlight
+completely during startup. This patch ignores the incorrect value from
+BIOS.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=56661
+Signed-off-by: Ash Willis <ashwillis@programmer.net>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/video.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -449,6 +449,14 @@ static struct dmi_system_id video_dmi_ta
+       },
+       {
+        .callback = video_ignore_initial_backlight,
++       .ident = "HP Pavilion g6 Notebook PC",
++       .matches = {
++               DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
++               DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
++              },
++      },
++      {
++       .callback = video_ignore_initial_backlight,
+        .ident = "HP Pavilion m4",
+        .matches = {
+               DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
diff --git a/queue-3.4/alsa-usb-audio-apply-logitech-quickcam-pro-9000-quirk-only-to-audio-iface.patch b/queue-3.4/alsa-usb-audio-apply-logitech-quickcam-pro-9000-quirk-only-to-audio-iface.patch
new file mode 100644 (file)
index 0000000..f6a3157
--- /dev/null
@@ -0,0 +1,37 @@
+From 8eafc0a161123d90617c9ca2eddfe87b382b1b89 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 4 Jun 2013 16:02:54 +0200
+Subject: ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 8eafc0a161123d90617c9ca2eddfe87b382b1b89 upstream.
+
+... instead of applying to all interfaces.
+
+Reference: http://forums.gentoo.org/viewtopic-p-6886404.html
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks-table.h |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -157,7 +157,13 @@
+       .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
+ },
+ {
+-      USB_DEVICE(0x046d, 0x0990),
++      .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
++                     USB_DEVICE_ID_MATCH_INT_CLASS |
++                     USB_DEVICE_ID_MATCH_INT_SUBCLASS,
++      .idVendor = 0x046d,
++      .idProduct = 0x0990,
++      .bInterfaceClass = USB_CLASS_AUDIO,
++      .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               .vendor_name = "Logitech, Inc.",
+               .product_name = "QuickCam Pro 9000",
diff --git a/queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-on-logitech-hd-webcam-c270.patch b/queue-3.4/alsa-usb-audio-fix-invalid-volume-resolution-on-logitech-hd-webcam-c270.patch
new file mode 100644 (file)
index 0000000..b1b91cb
--- /dev/null
@@ -0,0 +1,37 @@
+From 11e7064f35bb87da8f427d1aa4bbd8b7473a3993 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 5 Jun 2013 08:35:26 +0200
+Subject: ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 11e7064f35bb87da8f427d1aa4bbd8b7473a3993 upstream.
+
+USB audio driver spews an error message when probing Logitech HD
+webcam c270:
+  ALSA mixer.c:1300 usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong.
+  ALSA mixer.c:1304 usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 1536/7680/1
+
+Obviously the device needs a fixed volume resolution (cval->res = 384)
+like other Logitech devices.
+
+Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=821735
+
+Reported-and-tested-by: Cristian Rodríguez <crrodriguez@opensuse.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/mixer.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -822,6 +822,7 @@ static void volume_control_quirks(struct
+       case USB_ID(0x046d, 0x0808):
+       case USB_ID(0x046d, 0x0809):
+       case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
++      case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
+       case USB_ID(0x046d, 0x0991):
+       /* Most audio usb devices lie about volume resolution.
+        * Most Logitech webcams have res = 384.
diff --git a/queue-3.4/alsa-usb-audio-fix-roland-cakewalk-um-3g-support.patch b/queue-3.4/alsa-usb-audio-fix-roland-cakewalk-um-3g-support.patch
new file mode 100644 (file)
index 0000000..4e83b77
--- /dev/null
@@ -0,0 +1,37 @@
+From a0c6d309c6df14655f9962f666d1da96318b0b7c Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Sun, 2 Jun 2013 19:49:07 +0200
+Subject: ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit a0c6d309c6df14655f9962f666d1da96318b0b7c upstream.
+
+Commit 927c9423dd5f2d1c0b93d5e694ab84b4a5559713 (ALSA: usb-audio: add
+Edirol UM-3G support) used a wrong quirk type, which would make the
+driver refuse to attach with the error message "MIDIStreaming interface
+descriptor not found".
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks-table.h |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -1622,7 +1622,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+       USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               .ifnum = 0,
+-              .type = QUIRK_MIDI_STANDARD_INTERFACE
++              .type = QUIRK_MIDI_FIXED_ENDPOINT,
++              .data = & (const struct snd_usb_midi_endpoint_info) {
++                      .out_cables = 0x0007,
++                      .in_cables  = 0x0007
++              }
+       }
+ },
+ {
diff --git a/queue-3.4/series b/queue-3.4/series
new file mode 100644 (file)
index 0000000..13eda5c
--- /dev/null
@@ -0,0 +1,20 @@
+usb-option-blacklist-network-interface-on-huawei-e1820.patch
+xhci-correct-comp_mode_recovery_timer-on-return-from-hibernate.patch
+xhci-mem-init-list-heads-at-the-beginning-of-init.patch
+xhci-fix-list-access-before-init.patch
+alsa-usb-audio-fix-roland-cakewalk-um-3g-support.patch
+alsa-usb-audio-apply-logitech-quickcam-pro-9000-quirk-only-to-audio-iface.patch
+alsa-usb-audio-fix-invalid-volume-resolution-on-logitech-hd-webcam-c270.patch
+usb-iuu_phoenix-fix-bulk-message-timeout.patch
+usb-keyspan-fix-bogus-array-index.patch
+usb-ark3116-fix-control-message-timeout.patch
+usb-visor-fix-initialisation-of-treo-kyocera-devices.patch
+usb-serial-cypress_m8-enable-frwd-dongle-hidcom-device.patch
+usb-whiteheat-fix-broken-port-configuration.patch
+usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch
+usb-revert-periodic-scheduling-bugfix.patch
+usb-mos7720-fix-dma-to-stack.patch
+usb-mos7720-fix-message-timeouts.patch
+usb-mos7720-fix-hardware-flow-control.patch
+acpi-video-ignore-bios-initial-backlight-value-for-hp-m4.patch
+acpi-video-ignore-bios-initial-backlight-value-for-hp-pavilion-g6.patch
diff --git a/queue-3.4/usb-ark3116-fix-control-message-timeout.patch b/queue-3.4/usb-ark3116-fix-control-message-timeout.patch
new file mode 100644 (file)
index 0000000..6d01220
--- /dev/null
@@ -0,0 +1,30 @@
+From 634371911730a462626071065b64cd6e1fe213e0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:41 +0200
+Subject: USB: ark3116: fix control-message timeout
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 634371911730a462626071065b64cd6e1fe213e0 upstream.
+
+The control-message timeout is specified in milliseconds and should not
+depend on HZ.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ark3116.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ark3116.c
++++ b/drivers/usb/serial/ark3116.c
+@@ -49,7 +49,7 @@ static bool debug;
+ #define DRIVER_NAME "ark3116"
+ /* usb timeout of 1 second */
+-#define ARK_TIMEOUT (1*HZ)
++#define ARK_TIMEOUT 1000
+ static const struct usb_device_id id_table[] = {
+       { USB_DEVICE(0x6547, 0x0232) },
diff --git a/queue-3.4/usb-iuu_phoenix-fix-bulk-message-timeout.patch b/queue-3.4/usb-iuu_phoenix-fix-bulk-message-timeout.patch
new file mode 100644 (file)
index 0000000..32e4ab3
--- /dev/null
@@ -0,0 +1,39 @@
+From 6c13ff68a7ce01da7a51b44241a7aad8eaaedde7 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:42 +0200
+Subject: USB: iuu_phoenix: fix bulk-message timeout
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 6c13ff68a7ce01da7a51b44241a7aad8eaaedde7 upstream.
+
+The bulk-message timeout is specified in milliseconds and should not
+depend on HZ.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/iuu_phoenix.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/iuu_phoenix.c
++++ b/drivers/usb/serial/iuu_phoenix.c
+@@ -326,7 +326,7 @@ static int bulk_immediate(struct usb_ser
+           usb_bulk_msg(serial->dev,
+                        usb_sndbulkpipe(serial->dev,
+                                        port->bulk_out_endpointAddress), buf,
+-                       count, &actual, HZ * 1);
++                       count, &actual, 1000);
+       if (status != IUU_OPERATION_OK)
+               dbg("%s - error = %2x", __func__, status);
+@@ -349,7 +349,7 @@ static int read_immediate(struct usb_ser
+           usb_bulk_msg(serial->dev,
+                        usb_rcvbulkpipe(serial->dev,
+                                        port->bulk_in_endpointAddress), buf,
+-                       count, &actual, HZ * 1);
++                       count, &actual, 1000);
+       if (status != IUU_OPERATION_OK)
+               dbg("%s - error = %2x", __func__, status);
diff --git a/queue-3.4/usb-keyspan-fix-bogus-array-index.patch b/queue-3.4/usb-keyspan-fix-bogus-array-index.patch
new file mode 100644 (file)
index 0000000..eb09040
--- /dev/null
@@ -0,0 +1,31 @@
+From a07088098a650267b2eda689538133a324b9523f Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 4 Jun 2013 18:50:29 +0200
+Subject: USB: keyspan: fix bogus array index
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit a07088098a650267b2eda689538133a324b9523f upstream.
+
+The outcont_endpoints array was indexed using the port minor number
+(which can be greater than the array size) rather than the device port
+number.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/keyspan.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/keyspan.c
++++ b/drivers/usb/serial/keyspan.c
+@@ -1705,7 +1705,7 @@ static int keyspan_usa26_send_setup(stru
+       d_details = s_priv->device_details;
+       device_port = port->number - port->serial->minor;
+-      outcont_urb = d_details->outcont_endpoints[port->number];
++      outcont_urb = d_details->outcont_endpoints[device_port];
+       this_urb = p_priv->outcont_urb;
+       dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
diff --git a/queue-3.4/usb-mos7720-fix-dma-to-stack.patch b/queue-3.4/usb-mos7720-fix-dma-to-stack.patch
new file mode 100644 (file)
index 0000000..670b9fc
--- /dev/null
@@ -0,0 +1,47 @@
+From 72ea18a558ed7a63a50bb121ba60d73b5b38ae30 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:39 +0200
+Subject: USB: mos7720: fix DMA to stack
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 72ea18a558ed7a63a50bb121ba60d73b5b38ae30 upstream.
+
+The read_mos_reg function is called with stack-allocated buffers, which
+must not be used for control messages.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/mos7720.c |   17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/mos7720.c
++++ b/drivers/usb/serial/mos7720.c
+@@ -234,11 +234,22 @@ static int read_mos_reg(struct usb_seria
+       __u8 requesttype = (__u8)0xc0;
+       __u16 index = get_reg_index(reg);
+       __u16 value = get_reg_value(reg, serial_portnum);
+-      int status = usb_control_msg(usbdev, pipe, request, requesttype, value,
+-                                   index, data, 1, MOS_WDR_TIMEOUT);
+-      if (status < 0)
++      u8 *buf;
++      int status;
++
++      buf = kmalloc(1, GFP_KERNEL);
++      if (!buf)
++              return -ENOMEM;
++
++      status = usb_control_msg(usbdev, pipe, request, requesttype, value,
++                                   index, buf, 1, MOS_WDR_TIMEOUT);
++      if (status == 1)
++              *data = *buf;
++      else if (status < 0)
+               dev_err(&usbdev->dev,
+                       "mos7720: usb_control_msg() failed: %d", status);
++      kfree(buf);
++
+       return status;
+ }
diff --git a/queue-3.4/usb-mos7720-fix-hardware-flow-control.patch b/queue-3.4/usb-mos7720-fix-hardware-flow-control.patch
new file mode 100644 (file)
index 0000000..7a58505
--- /dev/null
@@ -0,0 +1,30 @@
+From a26f009a070e840fadacb91013b2391ba7ab6cc2 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 4 Jun 2013 18:50:31 +0200
+Subject: USB: mos7720: fix hardware flow control
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit a26f009a070e840fadacb91013b2391ba7ab6cc2 upstream.
+
+The register access to enable hardware flow control depends on the
+device port number and not the port minor number.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/mos7720.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/mos7720.c
++++ b/drivers/usb/serial/mos7720.c
+@@ -1701,7 +1701,7 @@ static void change_port_settings(struct
+               mos7720_port->shadowMCR |= (UART_MCR_XONANY);
+               /* To set hardware flow control to the specified *
+                * serial port, in SP1/2_CONTROL_REG             */
+-              if (port->number)
++              if (port_number)
+                       write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01);
+               else
+                       write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02);
diff --git a/queue-3.4/usb-mos7720-fix-message-timeouts.patch b/queue-3.4/usb-mos7720-fix-message-timeouts.patch
new file mode 100644 (file)
index 0000000..07ec7d4
--- /dev/null
@@ -0,0 +1,48 @@
+From 849513a7809175420d353625b6f651d961e99d49 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:43 +0200
+Subject: USB: mos7720: fix message timeouts
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 849513a7809175420d353625b6f651d961e99d49 upstream.
+
+The control and bulk-message timeouts are specified in milliseconds and
+should not depend on HZ.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/mos7720.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/mos7720.c
++++ b/drivers/usb/serial/mos7720.c
+@@ -44,7 +44,7 @@
+ #define DRIVER_DESC "Moschip USB Serial Driver"
+ /* default urb timeout */
+-#define MOS_WDR_TIMEOUT       (HZ * 5)
++#define MOS_WDR_TIMEOUT       5000
+ #define MOS_MAX_PORT  0x02
+ #define MOS_WRITE     0x0E
+@@ -2105,7 +2105,7 @@ static int mos7720_startup(struct usb_se
+       /* setting configuration feature to one */
+       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+-                      (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5*HZ);
++                      (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000);
+       /* start the interrupt urb */
+       ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL);
+@@ -2150,7 +2150,7 @@ static void mos7720_release(struct usb_s
+               /* wait for synchronous usb calls to return */
+               if (mos_parport->msg_pending)
+                       wait_for_completion_timeout(&mos_parport->syncmsg_compl,
+-                                                  MOS_WDR_TIMEOUT);
++                                          msecs_to_jiffies(MOS_WDR_TIMEOUT));
+               parport_remove_port(mos_parport->pp);
+               usb_set_serial_data(serial, NULL);
diff --git a/queue-3.4/usb-option-blacklist-network-interface-on-huawei-e1820.patch b/queue-3.4/usb-option-blacklist-network-interface-on-huawei-e1820.patch
new file mode 100644 (file)
index 0000000..1ffa0c8
--- /dev/null
@@ -0,0 +1,32 @@
+From b8a24e6281d37243c06b9497dcbfaa98c1e2ad35 Mon Sep 17 00:00:00 2001
+From: Bjørn Mork <bjorn@mork.no>
+Date: Thu, 6 Jun 2013 12:57:24 +0200
+Subject: USB: option: blacklist network interface on Huawei E1820
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit b8a24e6281d37243c06b9497dcbfaa98c1e2ad35 upstream.
+
+The mode used by Windows for the Huawei E1820 will use the
+same ff/ff/ff class codes for both serial and network
+functions.
+
+Reported-by: Graham Inggs <graham.inggs@uct.ac.za>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+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
+@@ -593,6 +593,8 @@ static const struct usb_device_id option
+               .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
+               .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
++      { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff),    /* Huawei E1820 */
++              .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
+               .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
+       { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
diff --git a/queue-3.4/usb-revert-periodic-scheduling-bugfix.patch b/queue-3.4/usb-revert-periodic-scheduling-bugfix.patch
new file mode 100644 (file)
index 0000000..06c30cf
--- /dev/null
@@ -0,0 +1,46 @@
+From fdc03438f53a00294ed9939eb3a1f6db6f3d8963 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Tue, 28 May 2013 14:03:10 -0400
+Subject: USB: revert periodic scheduling bugfix
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit fdc03438f53a00294ed9939eb3a1f6db6f3d8963 upstream.
+
+This patch reverts commit 3e619d04159be54b3daa0b7036b0ce9e067f4b5d
+(USB: EHCI: fix bug in scheduling periodic split transfers).  The
+commit was valid -- it fixed a real bug -- but the periodic scheduler
+in ehci-hcd is in such bad shape (especially the part that handles
+split transactions) that fixing one bug is very likely to cause
+another to surface.  That's what happened in this case; the result was
+choppy and noisy playback on certain 24-bit audio devices.
+
+The only real fix will be to rewrite this entire section of code.  My
+next project...
+
+This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1136110.
+
+Thanks to Tim Richardson for extra testing and feedback, and to Joseph
+Salisbury and Tyson Tan for tracking down the original source of the
+problem.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+CC: Joseph Salisbury <joseph.salisbury@canonical.com>
+CC: Tim Richardson <tim@tim-richardson.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ehci-sched.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ehci-sched.c
++++ b/drivers/usb/host/ehci-sched.c
+@@ -236,7 +236,7 @@ static inline unsigned char tt_start_ufr
+ }
+ static const unsigned char
+-max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 125, 25 };
++max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 };
+ /* carryover low/fullspeed bandwidth that crosses uframe boundries */
+ static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8])
diff --git a/queue-3.4/usb-serial-cypress_m8-enable-frwd-dongle-hidcom-device.patch b/queue-3.4/usb-serial-cypress_m8-enable-frwd-dongle-hidcom-device.patch
new file mode 100644 (file)
index 0000000..fcddf90
--- /dev/null
@@ -0,0 +1,92 @@
+From 6529591e3eef65f0f528a81ac169f6e294b947a7 Mon Sep 17 00:00:00 2001
+From: Robert Butora <robert.butora.fi@gmail.com>
+Date: Fri, 31 May 2013 18:09:51 +0300
+Subject: USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device
+
+From: Robert Butora <robert.butora.fi@gmail.com>
+
+commit 6529591e3eef65f0f528a81ac169f6e294b947a7 upstream.
+
+The patch adds a new HIDCOM device and does not affect other devices
+driven by the cypress_M8 module. Changes are:
+- add VendorID ProductID to device tables
+- skip unstable speed check because FRWD uses 115200bps
+- skip reset at probe which is an issue workaround for this
+particular device.
+
+Signed-off-by: Robert Butora <robert.butora.fi@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/cypress_m8.c |   18 +++++++++++++++++-
+ drivers/usb/serial/cypress_m8.h |    4 ++++
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/cypress_m8.c
++++ b/drivers/usb/serial/cypress_m8.c
+@@ -70,6 +70,7 @@ static const struct usb_device_id id_tab
+ static const struct usb_device_id id_table_cyphidcomrs232[] = {
+       { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+       { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
++      { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) },
+       { }                                             /* Terminating entry */
+ };
+@@ -83,6 +84,7 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) },
+       { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+       { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
++      { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) },
+       { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) },
+       { }                                             /* Terminating entry */
+ };
+@@ -243,6 +245,12 @@ static struct usb_serial_driver * const
+  * Cypress serial helper functions
+  *****************************************************************************/
++/* FRWD Dongle hidcom needs to skip reset and speed checks */
++static inline bool is_frwd(struct usb_device *dev)
++{
++      return ((le16_to_cpu(dev->descriptor.idVendor) == VENDOR_ID_FRWD) &&
++              (le16_to_cpu(dev->descriptor.idProduct) == PRODUCT_ID_CYPHIDCOM_FRWD));
++}
+ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
+ {
+@@ -252,6 +260,10 @@ static int analyze_baud_rate(struct usb_
+       if (unstable_bauds)
+               return new_rate;
++      /* FRWD Dongle uses 115200 bps */
++      if (is_frwd(port->serial->dev))
++              return new_rate;
++
+       /*
+        * The general purpose firmware for the Cypress M8 allows for
+        * a maximum speed of 57600bps (I have no idea whether DeLorme
+@@ -465,7 +477,11 @@ static int generic_startup(struct usb_se
+       }
+       init_waitqueue_head(&priv->delta_msr_wait);
+-      usb_reset_configuration(serial->dev);
++      /* Skip reset for FRWD device. It is a workaound:
++         device hangs if it receives SET_CONFIGURE in Configured
++         state. */
++      if (!is_frwd(serial->dev))
++              usb_reset_configuration(serial->dev);
+       priv->cmd_ctrl = 0;
+       priv->line_control = 0;
+--- a/drivers/usb/serial/cypress_m8.h
++++ b/drivers/usb/serial/cypress_m8.h
+@@ -24,6 +24,10 @@
+ #define VENDOR_ID_CYPRESS             0x04b4
+ #define PRODUCT_ID_CYPHIDCOM          0x5500
++/* FRWD Dongle - a GPS sports watch */
++#define VENDOR_ID_FRWD                        0x6737
++#define PRODUCT_ID_CYPHIDCOM_FRWD     0x0001
++
+ /* Powercom UPS, chip CY7C63723 */
+ #define VENDOR_ID_POWERCOM            0x0d9f
+ #define PRODUCT_ID_UPS                        0x0002
diff --git a/queue-3.4/usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch b/queue-3.4/usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch
new file mode 100644 (file)
index 0000000..c9331da
--- /dev/null
@@ -0,0 +1,29 @@
+From 5f8e2c07d75967ee49a5da1d21ddf5f50d48cda0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:37 +0200
+Subject: USB: serial: fix Treo/Kyocera interrrupt-in urb context
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 5f8e2c07d75967ee49a5da1d21ddf5f50d48cda0 upstream.
+
+The first and second interrupt-in urbs are swapped for some Treo/Kyocera
+devices, but the urb context was never updated with the new port.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/visor.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/visor.c
++++ b/drivers/usb/serial/visor.c
+@@ -608,6 +608,7 @@ static int treo_attach(struct usb_serial
+               dest->bulk_in_buffer = src->bulk_in_buffer;             \
+               dest->bulk_in_size = src->bulk_in_size;                 \
+               dest->interrupt_in_urb = src->interrupt_in_urb;         \
++              dest->interrupt_in_urb->context = dest;                 \
+               dest->interrupt_in_endpointAddress = \
+                                       src->interrupt_in_endpointAddress;\
+               dest->interrupt_in_buffer = src->interrupt_in_buffer;   \
diff --git a/queue-3.4/usb-visor-fix-initialisation-of-treo-kyocera-devices.patch b/queue-3.4/usb-visor-fix-initialisation-of-treo-kyocera-devices.patch
new file mode 100644 (file)
index 0000000..ea7b3a9
--- /dev/null
@@ -0,0 +1,40 @@
+From 420021a395ce38b7ab2cceb52dee4038be7d8fa3 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 27 May 2013 14:44:38 +0200
+Subject: USB: visor: fix initialisation of Treo/Kyocera devices
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 420021a395ce38b7ab2cceb52dee4038be7d8fa3 upstream.
+
+Fix regression introduced by commit 214916f2e ("USB: visor: reimplement
+using generic framework") which broke initialisation of Treo/Kyocera
+devices that re-mapped bulk-in endpoints.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/visor.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/usb/serial/visor.c
++++ b/drivers/usb/serial/visor.c
+@@ -596,9 +596,17 @@ static int treo_attach(struct usb_serial
+       */
+ #define COPY_PORT(dest, src)                                          \
+       do { \
++              int i;                                                  \
++                                                                      \
++              for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) {      \
++                      dest->read_urbs[i] = src->read_urbs[i];         \
++                      dest->read_urbs[i]->context = dest;             \
++                      dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \
++              }                                                       \
+               dest->read_urb = src->read_urb;                         \
+               dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\
+               dest->bulk_in_buffer = src->bulk_in_buffer;             \
++              dest->bulk_in_size = src->bulk_in_size;                 \
+               dest->interrupt_in_urb = src->interrupt_in_urb;         \
+               dest->interrupt_in_endpointAddress = \
+                                       src->interrupt_in_endpointAddress;\
diff --git a/queue-3.4/usb-whiteheat-fix-broken-port-configuration.patch b/queue-3.4/usb-whiteheat-fix-broken-port-configuration.patch
new file mode 100644 (file)
index 0000000..2566785
--- /dev/null
@@ -0,0 +1,31 @@
+From 9eecf22d2b375b9064a20421c6c307b760b03d46 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Thu, 6 Jun 2013 13:32:47 +0200
+Subject: USB: whiteheat: fix broken port configuration
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 9eecf22d2b375b9064a20421c6c307b760b03d46 upstream.
+
+When configuring the port (e.g. set_termios) the port minor number
+rather than the port number was used in the request (and they only
+coincide for minor number 0).
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/whiteheat.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/whiteheat.c
++++ b/drivers/usb/serial/whiteheat.c
+@@ -1154,7 +1154,7 @@ static void firm_setup_port(struct tty_s
+       struct whiteheat_port_settings port_settings;
+       unsigned int cflag = tty->termios->c_cflag;
+-      port_settings.port = port->number + 1;
++      port_settings.port = port->number - port->serial->minor + 1;
+       /* get the byte size */
+       switch (cflag & CSIZE) {
diff --git a/queue-3.4/xhci-correct-comp_mode_recovery_timer-on-return-from-hibernate.patch b/queue-3.4/xhci-correct-comp_mode_recovery_timer-on-return-from-hibernate.patch
new file mode 100644 (file)
index 0000000..65ee426
--- /dev/null
@@ -0,0 +1,104 @@
+From 77df9e0b799b03e1d5d9c68062709af5f637e834 Mon Sep 17 00:00:00 2001
+From: Tony Camuso <tcamuso@redhat.com>
+Date: Thu, 21 Feb 2013 16:11:27 -0500
+Subject: xhci - correct comp_mode_recovery_timer on return from hibernate
+
+From: Tony Camuso <tcamuso@redhat.com>
+
+commit 77df9e0b799b03e1d5d9c68062709af5f637e834 upstream.
+
+Commit 71c731a2 (usb: host: xhci: Fix Compliance Mode on SN65LVPE502CP
+Hardware) was a workaround for systems using the SN65LVPE502CP,
+controller, but it introduced a bug in resume from hibernate.
+
+The fix created a timer, comp_mode_recovery_timer, which is deleted from
+a timer list when xhci_suspend() is called. However, the hibernate image,
+including the timer list containing the comp_mode_recovery_timer, had
+already been saved before the timer was deleted.
+
+Upon resume from hibernate, the list containing the comp_mode_recovery_timer
+is restored from the image saved to disk, and xhci_resume(), assuming that
+the timer had been deleted by xhci_suspend(), makes a call to
+compliance_mode_recoery_timer_init(), which creates a new instance of the
+comp_mode_recovery_timer and attempts to place it into the same list in which
+it is already active, thus corrupting the list during the list_add() call.
+
+At this point, a call trace is emitted indicating the list corruption.
+Soon afterward, the system locks up, the watchdog times out, and the
+ensuing NMI crashes the system.
+
+The problem did not occur when resuming from suspend. In suspend, the
+image in RAM remains exactly as it was when xhci_suspend() deleted the
+comp_mode_recovery_timer, so there is no problem when xhci_resume()
+creates a new instance of this timer and places it in the still empty
+list.
+
+This patch avoids the problem by deleting the timer in xhci_resume()
+when resuming from hibernate. Now xhci_resume() can safely make the
+call to create a new instance of this timer, whether returning from
+suspend or hibernate.
+
+Thanks to Alan Stern for his help with understanding the problem.
+
+[Sarah reworked this patch to cover the case where the xHCI restore
+register operation fails, and (temp & STS_SRE) is true (and we re-init
+the host, including re-init for the compliance mode), but hibernate is
+false.  The original patch would have caused list corruption in this
+case.]
+
+This patch should be backported to kernels as old as 3.2, that
+contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
+xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"
+
+Signed-off-by: Tony Camuso <tcamuso@redhat.com>
+Tested-by: Tony Camuso <tcamuso@redhat.com>
+Acked-by: Don Zickus <dzickus@redhat.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -947,6 +947,7 @@ int xhci_resume(struct xhci_hcd *xhci, b
+       struct usb_hcd          *hcd = xhci_to_hcd(xhci);
+       struct usb_hcd          *secondary_hcd;
+       int                     retval = 0;
++      bool                    comp_timer_running = false;
+       /* Wait a bit if either of the roothubs need to settle from the
+        * transition into bus suspend.
+@@ -984,6 +985,13 @@ int xhci_resume(struct xhci_hcd *xhci, b
+       /* If restore operation fails, re-initialize the HC during resume */
+       if ((temp & STS_SRE) || hibernated) {
++
++              if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
++                              !(xhci_all_ports_seen_u0(xhci))) {
++                      del_timer_sync(&xhci->comp_mode_recovery_timer);
++                      xhci_dbg(xhci, "Compliance Mode Recovery Timer deleted!\n");
++              }
++
+               /* Let the USB core know _both_ roothubs lost power. */
+               usb_root_hub_lost_power(xhci->main_hcd->self.root_hub);
+               usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub);
+@@ -1026,6 +1034,8 @@ int xhci_resume(struct xhci_hcd *xhci, b
+               retval = xhci_init(hcd->primary_hcd);
+               if (retval)
+                       return retval;
++              comp_timer_running = true;
++
+               xhci_dbg(xhci, "Start the primary HCD\n");
+               retval = xhci_run(hcd->primary_hcd);
+               if (!retval) {
+@@ -1067,7 +1077,7 @@ int xhci_resume(struct xhci_hcd *xhci, b
+        * to suffer the Compliance Mode issue again. It doesn't matter if
+        * ports have entered previously to U0 before system's suspension.
+        */
+-      if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
++      if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running)
+               compliance_mode_recovery_timer_init(xhci);
+       /* Re-enable port polling. */
diff --git a/queue-3.4/xhci-fix-list-access-before-init.patch b/queue-3.4/xhci-fix-list-access-before-init.patch
new file mode 100644 (file)
index 0000000..9ddb095
--- /dev/null
@@ -0,0 +1,49 @@
+From 88696ae432ce7321540ac53d9caab3de9118b094 Mon Sep 17 00:00:00 2001
+From: Vladimir Murzin <murzin.v@gmail.com>
+Date: Tue, 9 Apr 2013 22:33:31 +0400
+Subject: xhci: fix list access before init
+
+From: Vladimir Murzin <murzin.v@gmail.com>
+
+commit 88696ae432ce7321540ac53d9caab3de9118b094 upstream.
+
+If for whatever reason we fall into fail path in xhci_mem_init()
+before bw table gets initialized we may access the uninitialized lists
+in xhci_mem_cleanup().
+
+Check for bw table before traversing lists in cleanup routine.
+
+This patch should be backported to kernels as old as 3.2, that contain
+the commit 839c817ce67178ca3c7c7ad534c571bba1e69ebe "xhci: Store
+information about roothubs and TTs."
+
+Reported-by: Sergey Dyasly <dserrg@gmail.com>
+Tested-by: Sergey Dyasly <dserrg@gmail.com>
+Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-mem.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -1845,6 +1845,9 @@ void xhci_mem_cleanup(struct xhci_hcd *x
+       }
+       spin_unlock_irqrestore(&xhci->lock, flags);
++      if (!xhci->rh_bw)
++              goto no_bw;
++
+       num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
+       for (i = 0; i < num_ports; i++) {
+               struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
+@@ -1863,6 +1866,7 @@ void xhci_mem_cleanup(struct xhci_hcd *x
+               }
+       }
++no_bw:
+       xhci->num_usb2_ports = 0;
+       xhci->num_usb3_ports = 0;
+       xhci->num_active_eps = 0;
diff --git a/queue-3.4/xhci-mem-init-list-heads-at-the-beginning-of-init.patch b/queue-3.4/xhci-mem-init-list-heads-at-the-beginning-of-init.patch
new file mode 100644 (file)
index 0000000..b11b20b
--- /dev/null
@@ -0,0 +1,60 @@
+From 331de00a64e5027365145bdf51da27b9ce15dfd5 Mon Sep 17 00:00:00 2001
+From: Sergio Aguirre <sergio.a.aguirre.rodriguez@intel.com>
+Date: Thu, 4 Apr 2013 10:32:13 -0700
+Subject: xhci-mem: init list heads at the beginning of init
+
+From: Sergio Aguirre <sergio.a.aguirre.rodriguez@intel.com>
+
+commit 331de00a64e5027365145bdf51da27b9ce15dfd5 upstream.
+
+It is possible that we fail on xhci_mem_init, just before doing
+the INIT_LIST_HEAD, and calling xhci_mem_cleanup.
+
+Problem is that, the list_for_each_entry_safe macro, assumes
+list heads are initialized (not NULL), and dereferences their 'next'
+pointer, causing a kernel panic if this is not yet initialized.
+
+Let's protect from that by moving inits to the beginning.
+
+This patch should be backported to kernels as old as 3.2, that
+contain the commit 9574323c39d1f8359a04843075d89c9f32d8b7e6 "xHCI: test
+USB2 software LPM".
+
+Signed-off-by: Sergio Aguirre <sergio.a.aguirre.rodriguez@intel.com>
+Acked-by: David Cohen <david.a.cohen@intel.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-mem.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -2274,6 +2274,9 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+       u32 page_size, temp;
+       int i;
++      INIT_LIST_HEAD(&xhci->lpm_failed_devs);
++      INIT_LIST_HEAD(&xhci->cancel_cmd_list);
++
+       page_size = xhci_readl(xhci, &xhci->op_regs->page_size);
+       xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size);
+       for (i = 0; i < 16; i++) {
+@@ -2352,7 +2355,6 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+       xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags);
+       if (!xhci->cmd_ring)
+               goto fail;
+-      INIT_LIST_HEAD(&xhci->cancel_cmd_list);
+       xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring);
+       xhci_dbg(xhci, "First segment DMA is 0x%llx\n",
+                       (unsigned long long)xhci->cmd_ring->first_seg->dma);
+@@ -2453,8 +2455,6 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+       if (xhci_setup_port_arrays(xhci, flags))
+               goto fail;
+-      INIT_LIST_HEAD(&xhci->lpm_failed_devs);
+-
+       /* Enable USB 3.0 device notifications for function remote wake, which
+        * is necessary for allowing USB 3.0 devices to do remote wakeup from
+        * U3 (device suspend).