]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 17 Nov 2008 06:18:56 +0000 (22:18 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 17 Nov 2008 06:18:56 +0000 (22:18 -0800)
queue-2.6.27/series
queue-2.6.27/usb-cdc-acm.c-fix-recursive-lock-in-acm_start_wb-error-path.patch [new file with mode: 0644]
queue-2.6.27/usb-fix-ps3-usb-shutdown-problems.patch [new file with mode: 0644]
queue-2.6.27/usb-gadget-cdc-acm-deadlock-fix.patch [new file with mode: 0644]
queue-2.6.27/usb-remove-optional-bus-bindings-in-isp1760-fixing-runtime-warning.patch [new file with mode: 0644]
queue-2.6.27/usb-unusual_devs-entry-for-argosy-usb-mass-storage-interface.patch [new file with mode: 0644]

index 2a832f2d11af04c9d936827ed24566dee270543a..bc42dd5c288fa1395d633a7bd98998cac6263fce 100644 (file)
@@ -31,3 +31,8 @@ scsi-qla2xxx-do-not-honour-max_vports-from-firmware-for-2g-isps-and-below.patch
 scsi-qla2xxx-correct-atmel-flash-part-handling.patch
 scsi-dpt_i2o-fix-transferred-data-length-for-scsi_set_resid.patch
 dm-raid1-flush-workqueue-before-destruction.patch
+usb-remove-optional-bus-bindings-in-isp1760-fixing-runtime-warning.patch
+usb-gadget-cdc-acm-deadlock-fix.patch
+usb-unusual_devs-entry-for-argosy-usb-mass-storage-interface.patch
+usb-fix-ps3-usb-shutdown-problems.patch
+usb-cdc-acm.c-fix-recursive-lock-in-acm_start_wb-error-path.patch
diff --git a/queue-2.6.27/usb-cdc-acm.c-fix-recursive-lock-in-acm_start_wb-error-path.patch b/queue-2.6.27/usb-cdc-acm.c-fix-recursive-lock-in-acm_start_wb-error-path.patch
new file mode 100644 (file)
index 0000000..e7b44be
--- /dev/null
@@ -0,0 +1,95 @@
+From ad0b65efd12d020b046cde8d6f474e37bb98dd73 Mon Sep 17 00:00:00 2001
+From: Brandon Philips <brandon@ifup.org>
+Date: Thu, 6 Nov 2008 11:19:11 -0800
+Subject: USB: cdc-acm.c: fix recursive lock in acm_start_wb error path
+
+From: Brandon Philips <brandon@ifup.org>
+
+commit ad0b65efd12d020b046cde8d6f474e37bb98dd73 upstream.
+
+Fixes an obvious bug in cdc-acm by avoiding a recursive lock on
+acm_start_wb()'s error path. Should apply towards 2.6.27 stable and
+2.6.28.
+
+=============================================
+[ INFO: possible recursive locking detected ]
+2.6.27-2-pae #109
+---------------------------------------------
+python/31449 is trying to acquire lock:
+ (&acm->write_lock){++..}, at: [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]
+
+but task is already holding lock:
+ (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]
+
+other info that might help us debug this:
+2 locks held by python/31449:
+ #0:  (&tty->atomic_write_lock){--..}, at: [<c0260fae>] tty_write_lock+0x14/0x3b
+ #1:  (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]
+
+stack backtrace:
+Pid: 31449, comm: python Not tainted 2.6.27-2-pae #109
+ [<c030f42f>] ? printk+0xf/0x18
+ [<c0149f33>] __lock_acquire+0xc7b/0x1316
+ [<c014a63e>] lock_acquire+0x70/0x97
+ [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
+ [<c0312109>] _spin_lock_irqsave+0x37/0x47
+ [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
+ [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]
+ [<f89a055d>] acm_tty_write+0x143/0x167 [cdc_acm]
+ [<c0262a98>] write_chan+0x1cd/0x297
+ [<c012527e>] ? default_wake_function+0x0/0xd
+ [<c026111e>] tty_write+0x149/0x1b9
+ [<c02628cb>] ? write_chan+0x0/0x297
+ [<c01912c5>] ? rw_verify_area+0x76/0x98
+ [<c0260fd5>] ? tty_write+0x0/0x1b9
+ [<c01919ba>] vfs_write+0x8c/0x136
+ [<c0191afd>] sys_write+0x3b/0x60
+ [<c0103beb>] sysenter_do_call+0x12/0x3f
+ =======================
+
+Signed-off-by: Brandon Philips <bphilips@suse.de>
+Cc: Oliver Neukum <oliver@neukum.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-acm.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *a
+ }
+ /*
+- * Finish write.
++ * Finish write. Caller must hold acm->write_lock
+  */
+ static void acm_write_done(struct acm *acm, struct acm_wb *wb)
+ {
+-      unsigned long flags;
+-
+-      spin_lock_irqsave(&acm->write_lock, flags);
+       wb->use = 0;
+       acm->transmitting--;
+-      spin_unlock_irqrestore(&acm->write_lock, flags);
+ }
+ /*
+@@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *u
+ {
+       struct acm_wb *wb = urb->context;
+       struct acm *acm = wb->instance;
++      unsigned long flags;
+       if (verbose || urb->status
+                       || (urb->actual_length != urb->transfer_buffer_length))
+@@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *u
+                       urb->transfer_buffer_length,
+                       urb->status);
++      spin_lock_irqsave(&acm->write_lock, flags);
+       acm_write_done(acm, wb);
++      spin_unlock_irqrestore(&acm->write_lock, flags);
+       if (ACM_READY(acm))
+               schedule_work(&acm->work);
+       else
diff --git a/queue-2.6.27/usb-fix-ps3-usb-shutdown-problems.patch b/queue-2.6.27/usb-fix-ps3-usb-shutdown-problems.patch
new file mode 100644 (file)
index 0000000..112c2d6
--- /dev/null
@@ -0,0 +1,60 @@
+From ddcb01ff9bf49c4dbbb058423559f7bc90b89374 Mon Sep 17 00:00:00 2001
+From: Geoff Levand <geoffrey.levand@am.sony.com>
+Date: Fri, 31 Oct 2008 13:52:54 -0700
+Subject: USB: Fix PS3 USB shutdown problems
+
+From: Geoff Levand <geoffrey.levand@am.sony.com>
+
+commit ddcb01ff9bf49c4dbbb058423559f7bc90b89374 upstream.
+
+Add ehci_shutdown() or ohci_shutdown() calls to the USB
+PS3 bus glue.  ehci_shutdown() and ohci_shutdown() do some
+controller specific cleanups not done by usb_remove_hcd().
+
+Fixes errors on shutdown or reboot similar to these:
+
+  ps3-ehci-driver sb_07: HC died; cleaning up
+  irq 51: nobody cared (try booting with the "irqpoll" option)
+
+Related bugzilla reports:
+
+  http://bugzilla.kernel.org/show_bug.cgi?id=11819
+  http://bugzilla.terrasoftsolutions.com/show_bug.cgi?id=317
+
+Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-ps3.c |    1 +
+ drivers/usb/host/ohci-ps3.c |    3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ehci-ps3.c
++++ b/drivers/usb/host/ehci-ps3.c
+@@ -205,6 +205,7 @@ static int ps3_ehci_remove(struct ps3_sy
+       tmp = hcd->irq;
++      ehci_shutdown(hcd);
+       usb_remove_hcd(hcd);
+       ps3_system_bus_set_driver_data(dev, NULL);
+--- a/drivers/usb/host/ohci-ps3.c
++++ b/drivers/usb/host/ohci-ps3.c
+@@ -192,7 +192,7 @@ fail_start:
+       return result;
+ }
+-static int ps3_ohci_remove (struct ps3_system_bus_device *dev)
++static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
+ {
+       unsigned int tmp;
+       struct usb_hcd *hcd =
+@@ -205,6 +205,7 @@ static int ps3_ohci_remove (struct ps3_s
+       tmp = hcd->irq;
++      ohci_shutdown(hcd);
+       usb_remove_hcd(hcd);
+       ps3_system_bus_set_driver_data(dev, NULL);
diff --git a/queue-2.6.27/usb-gadget-cdc-acm-deadlock-fix.patch b/queue-2.6.27/usb-gadget-cdc-acm-deadlock-fix.patch
new file mode 100644 (file)
index 0000000..fc73b36
--- /dev/null
@@ -0,0 +1,43 @@
+From e50ae572b33646656fa7037541613834dcadedfb Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Wed, 12 Nov 2008 11:35:13 -0800
+Subject: USB: gadget: cdc-acm deadlock fix
+
+From: David Brownell <dbrownell@users.sourceforge.net>
+
+commit e50ae572b33646656fa7037541613834dcadedfb upstream.
+
+This fixes a deadlock appearing with some USB peripheral drivers
+when running CDC ACM gadget code.
+
+The newish (2.6.27) CDC ACM event notification mechanism sends
+messages (IN to the host) which are short enough to fit in most
+FIFOs.  That means that with some peripheral controller drivers
+(evidently not the ones used to verify the notification code!!)
+the completion callback can be issued before queue() returns.
+
+The deadlock would come because the completion callback and the
+event-issuing code shared a spinlock.  Fix is trivial:  drop
+that lock while queueing the message.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/f_acm.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/gadget/f_acm.c
++++ b/drivers/usb/gadget/f_acm.c
+@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *
+       notify->wLength = cpu_to_le16(length);
+       memcpy(buf, data, length);
++      /* ep_queue() can complete immediately if it fills the fifo... */
++      spin_unlock(&acm->lock);
+       status = usb_ep_queue(ep, req, GFP_ATOMIC);
++      spin_lock(&acm->lock);
++
+       if (status < 0) {
+               ERROR(acm->port.func.config->cdev,
+                               "acm ttyGS%d can't notify serial state, %d\n",
diff --git a/queue-2.6.27/usb-remove-optional-bus-bindings-in-isp1760-fixing-runtime-warning.patch b/queue-2.6.27/usb-remove-optional-bus-bindings-in-isp1760-fixing-runtime-warning.patch
new file mode 100644 (file)
index 0000000..de3fea1
--- /dev/null
@@ -0,0 +1,163 @@
+From ff30bf1ca4b548c0928dae6bfce89458b95e5bf4 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Sun, 2 Nov 2008 15:25:42 +0100
+Subject: USB: remove optional bus bindings in isp1760, fixing runtime warning
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit ff30bf1ca4b548c0928dae6bfce89458b95e5bf4 upstream.
+
+Roland Reported the following:
+| kmem_cache_create: duplicate cache isp1760_qtd
+| Pid: 461, comm: modprobe Tainted: G        W  2.6.28-rc2-git3-default #4
+| Call Trace:
+|  [<c017540e>] kmem_cache_create+0xc9/0x3a3
+|  [<c0159a8d>] free_pages_bulk+0x16c/0x1c9
+|  [<f165c05f>] isp1760_init+0x0/0xb [isp1760]
+|  [<f165c018>] init_kmem_once+0x18/0x5f [isp1760]
+|  [<f165c064>] isp1760_init+0x5/0xb [isp1760]
+|  [<c010113d>] _stext+0x4d/0x148
+|  [<c0142936>] load_module+0x12cd/0x142e
+|  [<c01743c4>] kmem_cache_destroy+0x0/0xd7
+|  [<c0142b1e>] sys_init_module+0x87/0x176
+|  [<c01039eb>] sysenter_do_call+0x12/0x2f
+
+The reason, is that ret is initialized with ENODEV instead of 0 _or_
+the kmem cache is not freed in error case with no bus binding.
+
+The difference between OF+PCI and OF only is
+| 15148     804      32   15984    3e70 isp1760-of-pci.o
+| 13748     676       8   14432    3860 isp1760-of.o
+
+about 1.5 KiB.
+
+Until there is a checkbox where the user *must* select atleast one item,
+and may select multiple entries I don't make it selectable anymore.
+Having a driver which can't be used under any circumstances is broken
+anyway and I've seen distros shipping it that way.
+
+Reported-by: Roland Kletzing <devzero@web.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/Kconfig      |   23 ++++++-----------------
+ drivers/usb/host/isp1760-if.c |   22 +++++++++++-----------
+ 2 files changed, 17 insertions(+), 28 deletions(-)
+
+--- a/drivers/usb/host/isp1760-if.c
++++ b/drivers/usb/host/isp1760-if.c
+@@ -14,16 +14,16 @@
+ #include "../core/hcd.h"
+ #include "isp1760-hcd.h"
+-#ifdef CONFIG_USB_ISP1760_OF
++#ifdef CONFIG_PPC_OF
+ #include <linux/of.h>
+ #include <linux/of_platform.h>
+ #endif
+-#ifdef CONFIG_USB_ISP1760_PCI
++#ifdef CONFIG_PCI
+ #include <linux/pci.h>
+ #endif
+-#ifdef CONFIG_USB_ISP1760_OF
++#ifdef CONFIG_PPC_OF
+ static int of_isp1760_probe(struct of_device *dev,
+               const struct of_device_id *match)
+ {
+@@ -128,7 +128,7 @@ static struct of_platform_driver isp1760
+ };
+ #endif
+-#ifdef CONFIG_USB_ISP1760_PCI
++#ifdef CONFIG_PCI
+ static u32 nxp_pci_io_base;
+ static u32 iolength;
+ static u32 pci_mem_phy0;
+@@ -287,28 +287,28 @@ static struct pci_driver isp1761_pci_dri
+ static int __init isp1760_init(void)
+ {
+-      int ret = -ENODEV;
++      int ret;
+       init_kmem_once();
+-#ifdef CONFIG_USB_ISP1760_OF
++#ifdef CONFIG_PPC_OF
+       ret = of_register_platform_driver(&isp1760_of_driver);
+       if (ret) {
+               deinit_kmem_cache();
+               return ret;
+       }
+ #endif
+-#ifdef CONFIG_USB_ISP1760_PCI
++#ifdef CONFIG_PCI
+       ret = pci_register_driver(&isp1761_pci_driver);
+       if (ret)
+               goto unreg_of;
+ #endif
+       return ret;
+-#ifdef CONFIG_USB_ISP1760_PCI
++#ifdef CONFIG_PCI
+ unreg_of:
+ #endif
+-#ifdef CONFIG_USB_ISP1760_OF
++#ifdef CONFIG_PPC_OF
+       of_unregister_platform_driver(&isp1760_of_driver);
+ #endif
+       deinit_kmem_cache();
+@@ -318,10 +318,10 @@ module_init(isp1760_init);
+ static void __exit isp1760_exit(void)
+ {
+-#ifdef CONFIG_USB_ISP1760_OF
++#ifdef CONFIG_PPC_OF
+       of_unregister_platform_driver(&isp1760_of_driver);
+ #endif
+-#ifdef CONFIG_USB_ISP1760_PCI
++#ifdef CONFIG_PCI
+       pci_unregister_driver(&isp1761_pci_driver);
+ #endif
+       deinit_kmem_cache();
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -110,29 +110,18 @@ config USB_ISP116X_HCD
+ config USB_ISP1760_HCD
+       tristate "ISP 1760 HCD support"
+-      depends on USB && EXPERIMENTAL
++      depends on USB && EXPERIMENTAL && (PCI || PPC_OF)
+       ---help---
+         The ISP1760 chip is a USB 2.0 host controller.
+         This driver does not support isochronous transfers or OTG.
++        This USB controller is usually attached to a non-DMA-Master
++        capable bus. NXP's eval kit brings this chip on PCI card
++        where the chip itself is behind a PLB to simulate such
++        a bus.
+         To compile this driver as a module, choose M here: the
+-        module will be called isp1760-hcd.
+-
+-config USB_ISP1760_PCI
+-      bool "Support for the PCI bus"
+-      depends on USB_ISP1760_HCD && PCI
+-      ---help---
+-        Enables support for the device present on the PCI bus.
+-        This should only be required if you happen to have the eval kit from
+-        NXP and you are going to test it.
+-
+-config USB_ISP1760_OF
+-      bool "Support for the OF platform bus"
+-      depends on USB_ISP1760_HCD && PPC_OF
+-      ---help---
+-        Enables support for the device present on the PowerPC
+-        OpenFirmware platform bus.
++        module will be called isp1760.
+ config USB_OHCI_HCD
+       tristate "OHCI HCD support"
diff --git a/queue-2.6.27/usb-unusual_devs-entry-for-argosy-usb-mass-storage-interface.patch b/queue-2.6.27/usb-unusual_devs-entry-for-argosy-usb-mass-storage-interface.patch
new file mode 100644 (file)
index 0000000..37704cc
--- /dev/null
@@ -0,0 +1,36 @@
+From 8010e06cc90367b4d3fba3b0ec3ced32360ac890 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Tue, 4 Nov 2008 11:33:35 -0500
+Subject: USB: unusual_devs entry for Argosy USB mass-storage interface
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 8010e06cc90367b4d3fba3b0ec3ced32360ac890 upstream.
+
+This patch (as1162) adds an unusual_devs entry for Argosy's USB-IDE
+interface.  This fixes Bugzilla #11843.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Luciano Rocha <luciano@eurotux.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1251,6 +1251,13 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_INQUIRY),
++/* Reported by Luciano Rocha <luciano@eurotux.com> */
++UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001,
++              "Argosy",
++              "Storage",
++              US_SC_DEVICE, US_PR_DEVICE, NULL,
++              US_FL_FIX_CAPACITY),
++
+ /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+  * Flag will support Bulk devices which use a standards-violating 32-byte
+  * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with