]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Oct 2012 16:20:13 +0000 (09:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Oct 2012 16:20:13 +0000 (09:20 -0700)
added patches:
arm-7548-1-include-linux-sched.h-in-syscall.h.patch
em28xx-make-all-em28xx-extensions-to-be-initialized-asynchronously.patch
intel-iommu-default-to-non-coherent-for-domains-unattached-to-iommus.patch
media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch
media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch
media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch
powerpc-iommu-fix-multiple-issues-with-iommu-pools-code.patch

queue-3.6/arm-7548-1-include-linux-sched.h-in-syscall.h.patch [new file with mode: 0644]
queue-3.6/em28xx-make-all-em28xx-extensions-to-be-initialized-asynchronously.patch [new file with mode: 0644]
queue-3.6/intel-iommu-default-to-non-coherent-for-domains-unattached-to-iommus.patch [new file with mode: 0644]
queue-3.6/media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch [new file with mode: 0644]
queue-3.6/media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch [new file with mode: 0644]
queue-3.6/media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch [new file with mode: 0644]
queue-3.6/powerpc-iommu-fix-multiple-issues-with-iommu-pools-code.patch [new file with mode: 0644]
queue-3.6/series

diff --git a/queue-3.6/arm-7548-1-include-linux-sched.h-in-syscall.h.patch b/queue-3.6/arm-7548-1-include-linux-sched.h-in-syscall.h.patch
new file mode 100644 (file)
index 0000000..e067293
--- /dev/null
@@ -0,0 +1,40 @@
+From 8ef102c6b4bc996ff96ca52b34775fe931ec90c9 Mon Sep 17 00:00:00 2001
+From: Wade Farnsworth <wade_farnsworth@mentor.com>
+Date: Tue, 2 Oct 2012 17:08:30 +0100
+Subject: ARM: 7548/1: include linux/sched.h in syscall.h
+
+From: Wade Farnsworth <wade_farnsworth@mentor.com>
+
+commit 8ef102c6b4bc996ff96ca52b34775fe931ec90c9 upstream.
+
+The syscall tracing patch introduces a compile bug in lttng-modules
+when the latter calls syscall_get_nr(), similar to the following:
+
+<path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
+
+The issue is that we are using task_thread_info() in the
+syscall_get_nr() function in asm/syscall.h, but not explicitly
+including sched.h from this file, so we can expect this bug might
+surface any time that syscall_get_nr() is called.
+
+Explicitly including sched.h solves the problem.
+
+Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
+Acked-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/include/asm/syscall.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/include/asm/syscall.h
++++ b/arch/arm/include/asm/syscall.h
+@@ -8,6 +8,7 @@
+ #define _ASM_ARM_SYSCALL_H
+ #include <linux/err.h>
++#include <linux/sched.h>
+ extern const unsigned long sys_call_table[];
diff --git a/queue-3.6/em28xx-make-all-em28xx-extensions-to-be-initialized-asynchronously.patch b/queue-3.6/em28xx-make-all-em28xx-extensions-to-be-initialized-asynchronously.patch
new file mode 100644 (file)
index 0000000..b5e64f1
--- /dev/null
@@ -0,0 +1,87 @@
+From 6ae5e060840589f567c1837613e8a9d34fc9188a Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab@redhat.com>
+Date: Tue, 2 Oct 2012 15:35:27 -0300
+Subject: em28xx: Make all em28xx extensions to be initialized asynchronously
+
+From: Mauro Carvalho Chehab <mchehab@redhat.com>
+
+commit 6ae5e060840589f567c1837613e8a9d34fc9188a upstream.
+
+em28xx-dvb, em28xx-alsa and em28xx-ir are typically initialized
+asyncrhronously. The exception for it is when those modules
+are loaded before em28xx (or before an em28xx card insertion) or
+when they're built in.
+
+Make the extentions to always load asynchronously. That allows
+having all DVB firmwares loaded synchronously with udev-182.
+
+Antti tested it with the following hardware:
+       Hauppauge WinTV HVR 930C
+       MaxMedia UB425-TC
+       PCTV QuatroStick nano (520e)
+
+Tested-by: Antti Palosaari <crope@iki.fi>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/video/em28xx/em28xx-cards.c |   22 ++++++++++------------
+ 1 file changed, 10 insertions(+), 12 deletions(-)
+
+--- a/drivers/media/video/em28xx/em28xx-cards.c
++++ b/drivers/media/video/em28xx/em28xx-cards.c
+@@ -2875,12 +2875,20 @@ static void em28xx_card_setup(struct em2
+ }
+-#if defined(CONFIG_MODULES) && defined(MODULE)
+ static void request_module_async(struct work_struct *work)
+ {
+       struct em28xx *dev = container_of(work,
+                            struct em28xx, request_module_wk);
++      /*
++       * The em28xx extensions can be modules or builtin. If the
++       * modules are already loaded or are built in, those extensions
++       * can be initialised right now. Otherwise, the module init
++       * code will do it.
++       */
++      em28xx_init_extension(dev);
++
++#if defined(CONFIG_MODULES) && defined(MODULE)
+       if (dev->has_audio_class)
+               request_module("snd-usb-audio");
+       else if (dev->has_alsa_audio)
+@@ -2890,6 +2898,7 @@ static void request_module_async(struct
+               request_module("em28xx-dvb");
+       if (dev->board.ir_codes && !disable_ir)
+               request_module("em28xx-rc");
++#endif /* CONFIG_MODULES */
+ }
+ static void request_modules(struct em28xx *dev)
+@@ -2902,10 +2911,6 @@ static void flush_request_modules(struct
+ {
+       flush_work_sync(&dev->request_module_wk);
+ }
+-#else
+-#define request_modules(dev)
+-#define flush_request_modules(dev)
+-#endif /* CONFIG_MODULES */
+ /*
+  * em28xx_release_resources()
+@@ -3324,13 +3329,6 @@ static int em28xx_usb_probe(struct usb_i
+        */
+       mutex_unlock(&dev->lock);
+-      /*
+-       * These extensions can be modules. If the modules are already
+-       * loaded then we can initialise the device now, otherwise we
+-       * will initialise it when the modules load instead.
+-       */
+-      em28xx_init_extension(dev);
+-
+       return 0;
+ unlock_and_free:
diff --git a/queue-3.6/intel-iommu-default-to-non-coherent-for-domains-unattached-to-iommus.patch b/queue-3.6/intel-iommu-default-to-non-coherent-for-domains-unattached-to-iommus.patch
new file mode 100644 (file)
index 0000000..c41fad8
--- /dev/null
@@ -0,0 +1,52 @@
+From 2e12bc29fc5a12242d68e11875db3dd58efad9ff Mon Sep 17 00:00:00 2001
+From: Alex Williamson <alex.williamson@redhat.com>
+Date: Fri, 11 Nov 2011 17:26:44 -0700
+Subject: intel-iommu: Default to non-coherent for domains unattached to iommus
+
+From: Alex Williamson <alex.williamson@redhat.com>
+
+commit 2e12bc29fc5a12242d68e11875db3dd58efad9ff upstream.
+
+domain_update_iommu_coherency() currently defaults to setting domains
+as coherent when the domain is not attached to any iommus.  This
+allows for a window in domain_context_mapping_one() where such a
+domain can update context entries non-coherently, and only after
+update the domain capability to clear iommu_coherency.
+
+This can be seen using KVM device assignment on VT-d systems that
+do not support coherency in the ecap register.  When a device is
+added to a guest, a domain is created (iommu_coherency = 0), the
+device is attached, and ranges are mapped.  If we then hot unplug
+the device, the coherency is updated and set to the default (1)
+since no iommus are attached to the domain.  A subsequent attach
+of a device makes use of the same dmar domain (now marked coherent)
+updates context entries with coherency enabled, and only disables
+coherency as the last step in the process.
+
+To fix this, switch domain_update_iommu_coherency() to use the
+safer, non-coherent default for domains not attached to iommus.
+
+Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
+Tested-by: Donald Dutile <ddutile@redhat.com>
+Acked-by: Donald Dutile <ddutile@redhat.com>
+Acked-by: Chris Wright <chrisw@sous-sol.org>
+Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/intel-iommu.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
+@@ -589,7 +589,9 @@ static void domain_update_iommu_coherenc
+ {
+       int i;
+-      domain->iommu_coherency = 1;
++      i = find_first_bit(domain->iommu_bmp, g_num_of_iommus);
++
++      domain->iommu_coherency = i < g_num_of_iommus ? 1 : 0;
+       for_each_set_bit(i, domain->iommu_bmp, g_num_of_iommus) {
+               if (!ecap_coherent(g_iommus[i]->ecap)) {
diff --git a/queue-3.6/media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch b/queue-3.6/media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch
new file mode 100644 (file)
index 0000000..24dc7da
--- /dev/null
@@ -0,0 +1,28 @@
+From 97d2fbf501e3cf105ac957086c7e40e62e15cdf8 Mon Sep 17 00:00:00 2001
+From: Frank Schäfer <fschaefer.oss@googlemail.com>
+Date: Sun, 9 Sep 2012 15:02:19 -0300
+Subject: media: gspca_pac7302: add support for device 1ae7:2001 Speedlink Snappy Microphone SL-6825-SBK
+
+From: Frank Schäfer <fschaefer.oss@googlemail.com>
+
+commit 97d2fbf501e3cf105ac957086c7e40e62e15cdf8 upstream.
+
+Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/video/gspca/pac7302.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/video/gspca/pac7302.c
++++ b/drivers/media/video/gspca/pac7302.c
+@@ -905,6 +905,7 @@ static const struct usb_device_id device
+       {USB_DEVICE(0x093a, 0x262a)},
+       {USB_DEVICE(0x093a, 0x262c)},
+       {USB_DEVICE(0x145f, 0x013c)},
++      {USB_DEVICE(0x1ae7, 0x2001)}, /* SpeedLink Snappy Mic SL-6825-SBK */
+       {}
+ };
+ MODULE_DEVICE_TABLE(usb, device_table);
diff --git a/queue-3.6/media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch b/queue-3.6/media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch
new file mode 100644 (file)
index 0000000..6005052
--- /dev/null
@@ -0,0 +1,31 @@
+From db43b9ca2f101d0945d043fa7d5ecd8f2da17fef Mon Sep 17 00:00:00 2001
+From: Frank Schäfer <fschaefer.oss@googlemail.com>
+Date: Sun, 9 Sep 2012 15:02:20 -0300
+Subject: media: gspca_pac7302: make red balance and blue balance controls work again
+
+From: Frank Schäfer <fschaefer.oss@googlemail.com>
+
+commit db43b9ca2f101d0945d043fa7d5ecd8f2da17fef upstream.
+
+Fix a regression from kernel 3.4 which has been introduced with the conversion of the gspca driver to the v4l2 control framework.
+
+Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/video/gspca/pac7302.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/video/gspca/pac7302.c
++++ b/drivers/media/video/gspca/pac7302.c
+@@ -616,7 +616,7 @@ static int sd_init_controls(struct gspca
+       sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+                                       V4L2_CID_RED_BALANCE, 0, 3, 1, 1);
+       sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+-                                      V4L2_CID_RED_BALANCE, 0, 3, 1, 1);
++                                      V4L2_CID_BLUE_BALANCE, 0, 3, 1, 1);
+       gspca_dev->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+                                       V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
diff --git a/queue-3.6/media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch b/queue-3.6/media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch
new file mode 100644 (file)
index 0000000..0508ef1
--- /dev/null
@@ -0,0 +1,43 @@
+From 4b961180ef275035b1538317ffd0e21e80e63e77 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sun, 19 Aug 2012 19:32:27 -0300
+Subject: media: rc: ite-cir: Initialise ite_dev::rdev earlier
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit 4b961180ef275035b1538317ffd0e21e80e63e77 upstream.
+
+ite_dev::rdev is currently initialised in ite_probe() after
+rc_register_device() returns.  If a newly registered device is opened
+quickly enough, we may enable interrupts and try to use ite_dev::rdev
+before it has been initialised.  Move it up to the earliest point we
+can, right after calling rc_allocate_device().
+
+Reported-and-tested-by: YunQiang Su <wzssyqa@gmail.com>
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/rc/ite-cir.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/rc/ite-cir.c
++++ b/drivers/media/rc/ite-cir.c
+@@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pde
+       rdev = rc_allocate_device();
+       if (!rdev)
+               goto failure;
++      itdev->rdev = rdev;
+       ret = -ENODEV;
+@@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pde
+       if (ret)
+               goto failure3;
+-      itdev->rdev = rdev;
+       ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
+       return 0;
diff --git a/queue-3.6/powerpc-iommu-fix-multiple-issues-with-iommu-pools-code.patch b/queue-3.6/powerpc-iommu-fix-multiple-issues-with-iommu-pools-code.patch
new file mode 100644 (file)
index 0000000..786ad08
--- /dev/null
@@ -0,0 +1,100 @@
+From d900bd7366463fd96a907b2c212242e2b68b27d8 Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton@samba.org>
+Date: Wed, 3 Oct 2012 18:57:10 +0000
+Subject: powerpc/iommu: Fix multiple issues with IOMMU pools code
+
+From: Anton Blanchard <anton@samba.org>
+
+commit d900bd7366463fd96a907b2c212242e2b68b27d8 upstream.
+
+There are a number of issues in the recent IOMMU pools code:
+
+- On a preempt kernel we might switch CPUs in the middle of building
+  a scatter gather list. When this happens the handle hint passed in
+  no longer falls within the local CPU's pool. Check for this and
+  fall back to the pool hint.
+
+- We were missing a spin_unlock/spin_lock in one spot where we
+  switch pools.
+
+- We need to provide locking around dart_tlb_invalidate_all and
+  dart_tlb_invalidate_one now that the global lock is gone.
+
+Reported-by: Alexander Graf <agraf@suse.de>
+Signed-off-by: Anton Blanchard <anton@samba.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/kernel/iommu.c      |    5 ++++-
+ arch/powerpc/sysdev/dart_iommu.c |   12 ++++++++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/iommu.c
++++ b/arch/powerpc/kernel/iommu.c
+@@ -215,7 +215,8 @@ static unsigned long iommu_range_alloc(s
+       spin_lock_irqsave(&(pool->lock), flags);
+ again:
+-      if ((pass == 0) && handle && *handle)
++      if ((pass == 0) && handle && *handle &&
++          (*handle >= pool->start) && (*handle < pool->end))
+               start = *handle;
+       else
+               start = pool->hint;
+@@ -236,7 +237,9 @@ again:
+                * but on second pass, start at 0 in pool 0.
+                */
+               if ((start & mask) >= limit || pass > 0) {
++                      spin_unlock(&(pool->lock));
+                       pool = &(tbl->pools[0]);
++                      spin_lock(&(pool->lock));
+                       start = pool->start;
+               } else {
+                       start &= mask;
+--- a/arch/powerpc/sysdev/dart_iommu.c
++++ b/arch/powerpc/sysdev/dart_iommu.c
+@@ -74,11 +74,16 @@ static int dart_is_u4;
+ #define DBG(...)
++static DEFINE_SPINLOCK(invalidate_lock);
++
+ static inline void dart_tlb_invalidate_all(void)
+ {
+       unsigned long l = 0;
+       unsigned int reg, inv_bit;
+       unsigned long limit;
++      unsigned long flags;
++
++      spin_lock_irqsave(&invalidate_lock, flags);
+       DBG("dart: flush\n");
+@@ -111,12 +116,17 @@ retry:
+                       panic("DART: TLB did not flush after waiting a long "
+                             "time. Buggy U3 ?");
+       }
++
++      spin_unlock_irqrestore(&invalidate_lock, flags);
+ }
+ static inline void dart_tlb_invalidate_one(unsigned long bus_rpn)
+ {
+       unsigned int reg;
+       unsigned int l, limit;
++      unsigned long flags;
++
++      spin_lock_irqsave(&invalidate_lock, flags);
+       reg = DART_CNTL_U4_ENABLE | DART_CNTL_U4_IONE |
+               (bus_rpn & DART_CNTL_U4_IONE_MASK);
+@@ -138,6 +148,8 @@ wait_more:
+                       panic("DART: TLB did not flush after waiting a long "
+                             "time. Buggy U4 ?");
+       }
++
++      spin_unlock_irqrestore(&invalidate_lock, flags);
+ }
+ static void dart_flush(struct iommu_table *tbl)
index 23970e055b58e674aa6fa01265173061dfc7eb96..7bf38b7e69646ee1d7cb2820227c823a468a58a8 100644 (file)
@@ -4,3 +4,10 @@ kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch
 kbuild-fix-gcc-x-syntax.patch
 i2c-piix4-fix-build-failure.patch
 slab-fix-the-deadlock-issue-on-l3-alien-lock.patch
+powerpc-iommu-fix-multiple-issues-with-iommu-pools-code.patch
+intel-iommu-default-to-non-coherent-for-domains-unattached-to-iommus.patch
+arm-7548-1-include-linux-sched.h-in-syscall.h.patch
+em28xx-make-all-em28xx-extensions-to-be-initialized-asynchronously.patch
+media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch
+media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch
+media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch