]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 22:47:52 +0000 (15:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 22:47:52 +0000 (15:47 -0700)
added patches:
ehci-add-yet-another-lucid-nohandoff-pci-quirk.patch
ehci-fix-lucid-nohandoff-pci-quirk-to-be-more-generic-with-bios-versions.patch
usb-hub-send-clear_tt_buffer_complete-events-when-canceling-tt-clear-work.patch
usb-opticon-fix-dma-from-stack.patch
usb-opticon-fix-memory-leak-in-error-path.patch
usb-storage-add-unusual_devs-entry-for-casio-ex-n1-digital-camera.patch
usb-whiteheat-fix-memory-leak-in-error-path.patch

queue-3.0/ehci-add-yet-another-lucid-nohandoff-pci-quirk.patch [new file with mode: 0644]
queue-3.0/ehci-fix-lucid-nohandoff-pci-quirk-to-be-more-generic-with-bios-versions.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/usb-hub-send-clear_tt_buffer_complete-events-when-canceling-tt-clear-work.patch [new file with mode: 0644]
queue-3.0/usb-opticon-fix-dma-from-stack.patch [new file with mode: 0644]
queue-3.0/usb-opticon-fix-memory-leak-in-error-path.patch [new file with mode: 0644]
queue-3.0/usb-storage-add-unusual_devs-entry-for-casio-ex-n1-digital-camera.patch [new file with mode: 0644]
queue-3.0/usb-whiteheat-fix-memory-leak-in-error-path.patch [new file with mode: 0644]

diff --git a/queue-3.0/ehci-add-yet-another-lucid-nohandoff-pci-quirk.patch b/queue-3.0/ehci-add-yet-another-lucid-nohandoff-pci-quirk.patch
new file mode 100644 (file)
index 0000000..c395168
--- /dev/null
@@ -0,0 +1,34 @@
+From 8daf8b6086f9d575200cd0aa3797e26137255609 Mon Sep 17 00:00:00 2001
+From: Anisse Astier <anisse@astier.eu>
+Date: Tue, 9 Oct 2012 12:22:37 +0200
+Subject: ehci: Add yet-another Lucid nohandoff pci quirk
+
+From: Anisse Astier <anisse@astier.eu>
+
+commit 8daf8b6086f9d575200cd0aa3797e26137255609 upstream.
+
+Board name changed on another shipping Lucid tablet.
+
+Signed-off-by: Anisse Astier <anisse@astier.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/pci-quirks.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -546,6 +546,13 @@ static const struct dmi_system_id __devi
+                       DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
+               },
+       },
++      {
++              /*  Pegatron Lucid (Ordissimo) */
++              .matches = {
++                      DMI_MATCH(DMI_BOARD_NAME, "Ordissimo"),
++                      DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
++              },
++      },
+       { }
+ };
diff --git a/queue-3.0/ehci-fix-lucid-nohandoff-pci-quirk-to-be-more-generic-with-bios-versions.patch b/queue-3.0/ehci-fix-lucid-nohandoff-pci-quirk-to-be-more-generic-with-bios-versions.patch
new file mode 100644 (file)
index 0000000..211f37c
--- /dev/null
@@ -0,0 +1,30 @@
+From c323dc023b9501e5d09582ec7efd1d40a9001d99 Mon Sep 17 00:00:00 2001
+From: Anisse Astier <anisse@astier.eu>
+Date: Tue, 9 Oct 2012 12:22:36 +0200
+Subject: ehci: fix Lucid nohandoff pci quirk to be more generic with BIOS versions
+
+From: Anisse Astier <anisse@astier.eu>
+
+commit c323dc023b9501e5d09582ec7efd1d40a9001d99 upstream.
+
+BIOS vendors keep changing the BIOS versions. Only match the beginning
+of the string to match all Lucid tablets with board name M11JB.
+
+Signed-off-by: Anisse Astier <anisse@astier.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/pci-quirks.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -543,7 +543,7 @@ static const struct dmi_system_id __devi
+               /*  Pegatron Lucid (Ordissimo AIRIS) */
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_NAME, "M11JB"),
+-                      DMI_MATCH(DMI_BIOS_VERSION, "Lucid-GE-133"),
++                      DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
+               },
+       },
+       { }
index e9b1526ef5fd4461fe3076a71af83a3f00fd085e..94df6dc5f070b0d3b8a88b525f5b3a20bf2afd7c 100644 (file)
@@ -8,3 +8,10 @@ sunrpc-clear-the-connect-flag-when-socket-state-is-tcp_close_wait.patch
 revert-sunrpc-ensure-we-close-the-socket-on-epipe-errors-too.patch
 sunrpc-prevent-races-in-xs_abort_connection.patch
 sysfs-sysfs_pathname-sysfs_add_one-use-strlcat-instead-of-strcat.patch
+ehci-fix-lucid-nohandoff-pci-quirk-to-be-more-generic-with-bios-versions.patch
+ehci-add-yet-another-lucid-nohandoff-pci-quirk.patch
+usb-storage-add-unusual_devs-entry-for-casio-ex-n1-digital-camera.patch
+usb-hub-send-clear_tt_buffer_complete-events-when-canceling-tt-clear-work.patch
+usb-whiteheat-fix-memory-leak-in-error-path.patch
+usb-opticon-fix-dma-from-stack.patch
+usb-opticon-fix-memory-leak-in-error-path.patch
diff --git a/queue-3.0/usb-hub-send-clear_tt_buffer_complete-events-when-canceling-tt-clear-work.patch b/queue-3.0/usb-hub-send-clear_tt_buffer_complete-events-when-canceling-tt-clear-work.patch
new file mode 100644 (file)
index 0000000..e92aa9d
--- /dev/null
@@ -0,0 +1,144 @@
+From 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c Mon Sep 17 00:00:00 2001
+From: Octavian Purdila <octavian.purdila@intel.com>
+Date: Mon, 1 Oct 2012 22:21:12 +0300
+Subject: usb hub: send clear_tt_buffer_complete events when canceling TT clear work
+
+From: Octavian Purdila <octavian.purdila@intel.com>
+
+commit 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c upstream.
+
+There is a race condition in the USB hub code with regard to handling
+TT clear requests that can get the HCD driver in a deadlock. Usually
+when an TT clear request is scheduled it will be executed immediately:
+
+<7>[    6.077583] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
+<3>[    6.078041] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
+<7>[    6.078299] hub_tt_work:731
+<7>[    9.309089] usb 2-1.5: link qh1-0e01/f4d506c0 start 0 [1/2 us]
+<7>[    9.324526] ehci_hcd 0000:00:1d.0: reused qh f4d4db00 schedule
+<7>[    9.324539] usb 2-1.3: link qh1-0e01/f4d4db00 start 0 [1/2 us]
+<7>[    9.341530] usb 1-1.1: link qh4-0e01/f397aec0 start 2 [1/2 us]
+<7>[   10.116159] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
+<3>[   10.116459] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
+<7>[   10.116537] hub_tt_work:731
+
+However, if a suspend operation is triggered before hub_tt_work is
+scheduled, hub_quiesce will cancel the work without notifying the HCD
+driver:
+
+<3>[   35.033941] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d80
+<5>[   35.034022] sd 0:0:0:0: [sda] Stopping disk
+<7>[   35.034039] hub 2-1:1.0: hub_suspend
+<7>[   35.034067] usb 2-1: unlink qh256-0001/f3b1ab00 start 1 [1/0 us]
+<7>[   35.035085] hub 1-0:1.0: hub_suspend
+<7>[   35.035102] usb usb1: bus suspend, wakeup 0
+<7>[   35.035106] ehci_hcd 0000:00:1a.0: suspend root hub
+<7>[   35.035298] hub 2-0:1.0: hub_suspend
+<7>[   35.035313] usb usb2: bus suspend, wakeup 0
+<7>[   35.035315] ehci_hcd 0000:00:1d.0: suspend root hub
+<6>[   35.250017] PM: suspend of devices complete after 216.979 msecs
+<6>[   35.250822] PM: late suspend of devices complete after 0.799 msecs
+<7>[   35.252343] ehci_hcd 0000:00:1d.0: wakeup: 1
+<7>[   35.262923] ehci_hcd 0000:00:1d.0: --> PCI D3hot
+<7>[   35.263302] ehci_hcd 0000:00:1a.0: wakeup: 1
+<7>[   35.273912] ehci_hcd 0000:00:1a.0: --> PCI D3hot
+<6>[   35.274254] PM: noirq suspend of devices complete after 23.442 msecs
+<6>[   35.274975] ACPI: Preparing to enter system sleep state S3
+<6>[   35.292666] PM: Saving platform NVS memory
+<7>[   35.295030] Disabling non-boot CPUs ...
+<6>[   35.297351] CPU 1 is now offline
+<6>[   35.300345] CPU 2 is now offline
+<6>[   35.303929] CPU 3 is now offline
+<7>[   35.303931] lockdep: fixing up alternatives.
+<6>[   35.304825] Extended CMOS year: 2000
+
+When the device will resume the EHCI driver will get stuck in
+ehci_endpoint_disable waiting for the tt_clearing flag to reset:
+
+<0>[   47.610967] usb 2-1.3: **** DPM device timeout ****
+<7>[   47.610972]  f2f11c60 00000092 f2f11c0c c10624a5 00000003 f4c6e880 c1c8a4c0 c1c8a4c0
+<7>[   47.610983]  15c55698 0000000b f56b34c0 f2a45b70 f4c6e880 00000082 f2a4602c f2f11c30
+<7>[   47.610993]  c10787f8 f4cac000 f2a45b70 00000000 f4cac010 f2f11c58 00000046 00000001
+<7>[   47.611004] Call Trace:
+<7>[   47.611006]  [<c10624a5>] ? sched_clock_cpu+0xf5/0x160
+<7>[   47.611019]  [<c10787f8>] ? lock_release_holdtime.part.22+0x88/0xf0
+<7>[   47.611026]  [<c103ed46>] ? lock_timer_base.isra.35+0x26/0x50
+<7>[   47.611034]  [<c17592d3>] ? schedule_timeout+0x133/0x290
+<7>[   47.611044]  [<c175b43e>] schedule+0x1e/0x50
+<7>[   47.611051]  [<c17592d8>] schedule_timeout+0x138/0x290
+<7>[   47.611057]  [<c10624a5>] ? sched_clock_cpu+0xf5/0x160
+<7>[   47.611063]  [<c103e560>] ? usleep_range+0x40/0x40
+<7>[   47.611070]  [<c1759445>] schedule_timeout_uninterruptible+0x15/0x20
+<7>[   47.611077]  [<c14935f4>] ehci_endpoint_disable+0x64/0x160
+<7>[   47.611084]  [<c147d1ee>] ? usb_hcd_flush_endpoint+0x10e/0x1d0
+<7>[   47.611092]  [<c1165663>] ? sysfs_add_file+0x13/0x20
+<7>[   47.611100]  [<c147d5a9>] usb_hcd_disable_endpoint+0x29/0x40
+<7>[   47.611107]  [<c147fafc>] usb_disable_endpoint+0x5c/0x80
+<7>[   47.611111]  [<c147fb57>] usb_disable_interface+0x37/0x50
+<7>[   47.611116]  [<c1477650>] usb_reset_and_verify_device+0x4b0/0x640
+<7>[   47.611122]  [<c1474665>] ? hub_port_status+0xb5/0x100
+<7>[   47.611129]  [<c147a975>] usb_port_resume+0xd5/0x220
+<7>[   47.611136]  [<c148877f>] generic_resume+0xf/0x30
+<7>[   47.611142]  [<c14821a3>] usb_resume+0x133/0x180
+<7>[   47.611147]  [<c1473b10>] ? usb_dev_thaw+0x10/0x10
+<7>[   47.611152]  [<c1473b1d>] usb_dev_resume+0xd/0x10
+<7>[   47.611157]  [<c13baa60>] dpm_run_callback+0x40/0xb0
+<7>[   47.611164]  [<c13bdb03>] ? pm_runtime_enable+0x43/0x70
+<7>[   47.611171]  [<c13bafc6>] device_resume+0x1a6/0x2c0
+<7>[   47.611177]  [<c13ba940>] ? dpm_show_time+0xe0/0xe0
+<7>[   47.611183]  [<c13bb0f9>] async_resume+0x19/0x40
+<7>[   47.611189]  [<c10580c4>] async_run_entry_fn+0x64/0x160
+<7>[   47.611196]  [<c104a244>] ? process_one_work+0x104/0x480
+<7>[   47.611203]  [<c104a24c>] ? process_one_work+0x10c/0x480
+<7>[   47.611209]  [<c104a2c0>] process_one_work+0x180/0x480
+<7>[   47.611215]  [<c104a244>] ? process_one_work+0x104/0x480
+<7>[   47.611220]  [<c1058060>] ? async_schedule+0x10/0x10
+<7>[   47.611226]  [<c104c15c>] worker_thread+0x11c/0x2f0
+<7>[   47.611233]  [<c104c040>] ? manage_workers.isra.27+0x1f0/0x1f0
+<7>[   47.611239]  [<c10507f8>] kthread+0x78/0x80
+<7>[   47.611244]  [<c1750000>] ? timer_cpu_notify+0xd6/0x20d
+<7>[   47.611253]  [<c1050780>] ? __init_kthread_worker+0x60/0x60
+<7>[   47.611258]  [<c176357e>] kernel_thread_helper+0x6/0xd
+<7>[   47.611283] ------------[ cut here ]------------
+
+This patch changes hub_quiesce behavior to flush the TT clear work
+instead of canceling it, to make sure that no TT clear request remains
+uncompleted before suspend.
+
+Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/hub.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -482,13 +482,16 @@ static void hub_tt_work(struct work_stru
+       int                     limit = 100;
+       spin_lock_irqsave (&hub->tt.lock, flags);
+-      while (--limit && !list_empty (&hub->tt.clear_list)) {
++      while (!list_empty(&hub->tt.clear_list)) {
+               struct list_head        *next;
+               struct usb_tt_clear     *clear;
+               struct usb_device       *hdev = hub->hdev;
+               const struct hc_driver  *drv;
+               int                     status;
++              if (!hub->quiescing && --limit < 0)
++                      break;
++
+               next = hub->tt.clear_list.next;
+               clear = list_entry (next, struct usb_tt_clear, clear_list);
+               list_del (&clear->clear_list);
+@@ -952,7 +955,7 @@ static void hub_quiesce(struct usb_hub *
+       if (hub->has_indicators)
+               cancel_delayed_work_sync(&hub->leds);
+       if (hub->tt.hub)
+-              cancel_work_sync(&hub->tt.clear_work);
++              flush_work_sync(&hub->tt.clear_work);
+ }
+ /* caller has locked the hub device */
diff --git a/queue-3.0/usb-opticon-fix-dma-from-stack.patch b/queue-3.0/usb-opticon-fix-dma-from-stack.patch
new file mode 100644 (file)
index 0000000..9c31a25
--- /dev/null
@@ -0,0 +1,44 @@
+From ea0dbebffe118724cd4df7d9b071ea8ee48d48f0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Thu, 25 Oct 2012 10:29:11 +0200
+Subject: USB: opticon: fix DMA from stack
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit ea0dbebffe118724cd4df7d9b071ea8ee48d48f0 upstream.
+
+Make sure to allocate the control-message buffer dynamically as some
+platforms cannot do DMA from stack.
+
+Note that only the first byte of the old buffer was used.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/opticon.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/opticon.c
++++ b/drivers/usb/serial/opticon.c
+@@ -160,7 +160,11 @@ static int send_control_msg(struct usb_s
+ {
+       struct usb_serial *serial = port->serial;
+       int retval;
+-      u8 buffer[2];
++      u8 *buffer;
++
++      buffer = kzalloc(1, GFP_KERNEL);
++      if (!buffer)
++              return -ENOMEM;
+       buffer[0] = val;
+       /* Send the message to the vendor control endpoint
+@@ -169,6 +173,7 @@ static int send_control_msg(struct usb_s
+                               requesttype,
+                               USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
+                               0, 0, buffer, 1, 0);
++      kfree(buffer);
+       return retval;
+ }
diff --git a/queue-3.0/usb-opticon-fix-memory-leak-in-error-path.patch b/queue-3.0/usb-opticon-fix-memory-leak-in-error-path.patch
new file mode 100644 (file)
index 0000000..17599ce
--- /dev/null
@@ -0,0 +1,38 @@
+From acbf0e5263de563e25f7c104868e4490b9e72b13 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Thu, 25 Oct 2012 10:29:12 +0200
+Subject: USB: opticon: fix memory leak in error path
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit acbf0e5263de563e25f7c104868e4490b9e72b13 upstream.
+
+Fix memory leak in write error path.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/opticon.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/opticon.c
++++ b/drivers/usb/serial/opticon.c
+@@ -297,7 +297,7 @@ static int opticon_write(struct tty_stru
+       if (!dr) {
+               dev_err(&port->dev, "out of memory\n");
+               count = -ENOMEM;
+-              goto error;
++              goto error_no_dr;
+       }
+       dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT;
+@@ -327,6 +327,8 @@ static int opticon_write(struct tty_stru
+       return count;
+ error:
++      kfree(dr);
++error_no_dr:
+       usb_free_urb(urb);
+ error_no_urb:
+       kfree(buffer);
diff --git a/queue-3.0/usb-storage-add-unusual_devs-entry-for-casio-ex-n1-digital-camera.patch b/queue-3.0/usb-storage-add-unusual_devs-entry-for-casio-ex-n1-digital-camera.patch
new file mode 100644 (file)
index 0000000..7e597fe
--- /dev/null
@@ -0,0 +1,39 @@
+From d7870af7e2e3a91b462075ec1ca669b482215187 Mon Sep 17 00:00:00 2001
+From: Michael Shigorin <mike@osdn.org.ua>
+Date: Mon, 22 Oct 2012 12:18:56 +0300
+Subject: usb-storage: add unusual_devs entry for Casio EX-N1 digital camera
+
+From: Michael Shigorin <mike@osdn.org.ua>
+
+commit d7870af7e2e3a91b462075ec1ca669b482215187 upstream.
+
+This commit sets removable subclass for Casio EX-N1 digital camera.
+
+The patch has been tested within an ALT Linux kernel:
+http://git.altlinux.org/people/led/packages/?p=kernel-image-3.0.git;a=commitdiff;h=c0fd891836e89fe0c93a4d536a59216d90e4e3e7
+
+See also https://bugzilla.kernel.org/show_bug.cgi?id=49221
+
+Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
+Signed-off-by: Michael Shigorin <mike@osdn.org.ua>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/unusual_devs.h |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1004,6 +1004,12 @@ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9
+               USB_SC_8070, USB_PR_CB, NULL,
+               US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ),
++/* Submitted by Oleksandr Chumachenko <ledest@gmail.com> */
++UNUSUAL_DEV( 0x07cf, 0x1167, 0x0100, 0x0100,
++              "Casio",
++              "EX-N1 DigitalCamera",
++              USB_SC_8070, USB_PR_DEVICE, NULL, 0),
++
+ /* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/
+ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001,
+               "Samsung",
diff --git a/queue-3.0/usb-whiteheat-fix-memory-leak-in-error-path.patch b/queue-3.0/usb-whiteheat-fix-memory-leak-in-error-path.patch
new file mode 100644 (file)
index 0000000..8be9109
--- /dev/null
@@ -0,0 +1,29 @@
+From c129197c99550d356cf5f69b046994dd53cd1b9d Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Thu, 25 Oct 2012 10:29:01 +0200
+Subject: USB: whiteheat: fix memory leak in error path
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit c129197c99550d356cf5f69b046994dd53cd1b9d upstream.
+
+Make sure command buffer is deallocated in case of errors during attach.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Cc: <support@connecttech.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/whiteheat.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/whiteheat.c
++++ b/drivers/usb/serial/whiteheat.c
+@@ -576,6 +576,7 @@ no_firmware:
+               "%s: please contact support@connecttech.com\n",
+               serial->type->description);
+       kfree(result);
++      kfree(command);
+       return -ENODEV;
+ no_command_private: