]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 16:25:02 +0000 (08:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 16:25:02 +0000 (08:25 -0800)
added patches:
media-em28xx-fix-input-name-for-terratec-av-350.patch
media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch
media-em28xx-use-a-default-format-if-try_fmt-fails.patch
xen-fix-xen_qlock_wait.patch

queue-4.4/media-em28xx-fix-input-name-for-terratec-av-350.patch [new file with mode: 0644]
queue-4.4/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch [new file with mode: 0644]
queue-4.4/media-em28xx-use-a-default-format-if-try_fmt-fails.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/xen-fix-xen_qlock_wait.patch [new file with mode: 0644]

diff --git a/queue-4.4/media-em28xx-fix-input-name-for-terratec-av-350.patch b/queue-4.4/media-em28xx-fix-input-name-for-terratec-av-350.patch
new file mode 100644 (file)
index 0000000..de1489e
--- /dev/null
@@ -0,0 +1,39 @@
+From 15644bfa195bd166d0a5ed76ae2d587f719c3dac Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Date: Fri, 14 Sep 2018 00:20:21 -0400
+Subject: media: em28xx: fix input name for Terratec AV 350
+
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+
+commit 15644bfa195bd166d0a5ed76ae2d587f719c3dac upstream.
+
+Instead of using a register value, use an AMUX name, as otherwise
+VIDIOC_G_AUDIO would fail.
+
+Cc: stable@vger.kernel.org
+Fixes: 766ed64de554 ("V4L/DVB (11827): Add support for Terratec Grabster AV350")
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/em28xx/em28xx-cards.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/usb/em28xx/em28xx-cards.c
++++ b/drivers/media/usb/em28xx/em28xx-cards.c
+@@ -2021,13 +2021,13 @@ struct em28xx_board em28xx_boards[] = {
+               .input           = { {
+                       .type     = EM28XX_VMUX_COMPOSITE1,
+                       .vmux     = TVP5150_COMPOSITE1,
+-                      .amux     = EM28XX_AUDIO_SRC_LINE,
++                      .amux     = EM28XX_AMUX_LINE_IN,
+                       .gpio     = terratec_av350_unmute_gpio,
+               }, {
+                       .type     = EM28XX_VMUX_SVIDEO,
+                       .vmux     = TVP5150_SVIDEO,
+-                      .amux     = EM28XX_AUDIO_SRC_LINE,
++                      .amux     = EM28XX_AMUX_LINE_IN,
+                       .gpio     = terratec_av350_unmute_gpio,
+               } },
+       },
diff --git a/queue-4.4/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch b/queue-4.4/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch
new file mode 100644 (file)
index 0000000..ff0142f
--- /dev/null
@@ -0,0 +1,41 @@
+From afeaade90db4c5dab93f326d9582be1d5954a198 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Date: Thu, 13 Sep 2018 22:46:29 -0400
+Subject: media: em28xx: make v4l2-compliance happier by starting sequence on zero
+
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+
+commit afeaade90db4c5dab93f326d9582be1d5954a198 upstream.
+
+The v4l2-compliance tool complains if a video doesn't start
+with a zero sequence number.
+
+While this shouldn't cause any real problem for apps, let's
+make it happier, in order to better check the v4l2-compliance
+differences before and after patchsets.
+
+This is actually an old issue. It is there since at least its
+videobuf2 conversion, e. g. changeset 3829fadc461 ("[media]
+em28xx: convert to videobuf2"), if VB1 wouldn't suffer from
+the same issue.
+
+Cc: stable@vger.kernel.org
+Fixes: d3829fadc461 ("[media] em28xx: convert to videobuf2")
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/em28xx/em28xx-video.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/media/usb/em28xx/em28xx-video.c
++++ b/drivers/media/usb/em28xx/em28xx-video.c
+@@ -1149,6 +1149,8 @@ static void em28xx_ctrl_notify(struct v4
+ {
+       struct em28xx *dev = priv;
++      dev->v4l2->field_count = 0;
++
+       /*
+        * In the case of non-AC97 volume controls, we still need
+        * to do some setups at em28xx, in order to mute/unmute
diff --git a/queue-4.4/media-em28xx-use-a-default-format-if-try_fmt-fails.patch b/queue-4.4/media-em28xx-use-a-default-format-if-try_fmt-fails.patch
new file mode 100644 (file)
index 0000000..05c3fd1
--- /dev/null
@@ -0,0 +1,40 @@
+From f823ce2a1202d47110a7ef86b65839f0be8adc38 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Date: Thu, 13 Sep 2018 23:22:40 -0400
+Subject: media: em28xx: use a default format if TRY_FMT fails
+
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+
+commit f823ce2a1202d47110a7ef86b65839f0be8adc38 upstream.
+
+Follow the V4L2 spec, as warned by v4l2-compliance:
+
+       warn: v4l2-test-formats.cpp(732): TRY_FMT cannot handle an invalid pixelformat.
+       warn: v4l2-test-formats.cpp(733): This may or may not be a problem. For more information see:
+
+warn: v4l2-test-formats.cpp(734): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
+
+Cc: stable@vger.kernel.org
+Fixes: bddcf63313c6 ("V4L/DVB (9927): em28xx: use a more standard way to specify video formats")
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/em28xx/em28xx-video.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/media/usb/em28xx/em28xx-video.c
++++ b/drivers/media/usb/em28xx/em28xx-video.c
+@@ -1288,9 +1288,9 @@ static int vidioc_try_fmt_vid_cap(struct
+       fmt = format_by_fourcc(f->fmt.pix.pixelformat);
+       if (!fmt) {
+-              em28xx_videodbg("Fourcc format (%08x) invalid.\n",
+-                              f->fmt.pix.pixelformat);
+-              return -EINVAL;
++              fmt = &format[0];
++              em28xx_videodbg("Fourcc format (%08x) invalid. Using default (%08x).\n",
++                              f->fmt.pix.pixelformat, fmt->fourcc);
+       }
+       if (dev->board.is_em2800) {
index 08fa35cec0a6e1c3189d5781f27345b66d4ba2df..fca61de66544c91e72b73aadefb766ec66df4e87 100644 (file)
@@ -78,3 +78,7 @@ powerpc-msi-fix-compile-error-on-mpc83xx.patch
 mips-octeon-fix-out-of-bounds-array-access-on-cn68xx.patch
 tc-set-dma-masks-for-devices.patch
 kgdboc-passing-ekgdboc-to-command-line-causes-panic.patch
+xen-fix-xen_qlock_wait.patch
+media-em28xx-use-a-default-format-if-try_fmt-fails.patch
+media-em28xx-fix-input-name-for-terratec-av-350.patch
+media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch
diff --git a/queue-4.4/xen-fix-xen_qlock_wait.patch b/queue-4.4/xen-fix-xen_qlock_wait.patch
new file mode 100644 (file)
index 0000000..f2159c8
--- /dev/null
@@ -0,0 +1,82 @@
+From d3132b3860f6cf35ff7609a76bbcdbb814bd027c Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Thu, 8 Nov 2018 08:35:06 +0100
+Subject: xen: fix xen_qlock_wait()
+
+From: Juergen Gross <jgross@suse.com>
+
+commit d3132b3860f6cf35ff7609a76bbcdbb814bd027c upstream.
+
+Commit a856531951dc80 ("xen: make xen_qlock_wait() nestable")
+introduced a regression for Xen guests running fully virtualized
+(HVM or PVH mode). The Xen hypervisor wouldn't return from the poll
+hypercall with interrupts disabled in case of an interrupt (for PV
+guests it does).
+
+So instead of disabling interrupts in xen_qlock_wait() use a nesting
+counter to avoid calling xen_clear_irq_pending() in case
+xen_qlock_wait() is nested.
+
+Fixes: a856531951dc80 ("xen: make xen_qlock_wait() nestable")
+Cc: stable@vger.kernel.org
+Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/xen/spinlock.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/arch/x86/xen/spinlock.c
++++ b/arch/x86/xen/spinlock.c
+@@ -8,6 +8,7 @@
+ #include <linux/log2.h>
+ #include <linux/gfp.h>
+ #include <linux/slab.h>
++#include <linux/atomic.h>
+ #include <asm/paravirt.h>
+@@ -19,6 +20,7 @@
+ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1;
+ static DEFINE_PER_CPU(char *, irq_name);
++static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest);
+ static bool xen_pvspin = true;
+ #ifdef CONFIG_QUEUED_SPINLOCKS
+@@ -41,25 +43,25 @@ static void xen_qlock_kick(int cpu)
+  */
+ static void xen_qlock_wait(u8 *byte, u8 val)
+ {
+-      unsigned long flags;
+       int irq = __this_cpu_read(lock_kicker_irq);
++      atomic_t *nest_cnt = this_cpu_ptr(&xen_qlock_wait_nest);
+       /* If kicker interrupts not initialized yet, just spin */
+       if (irq == -1 || in_nmi())
+               return;
+-      /* Guard against reentry. */
+-      local_irq_save(flags);
++      /* Detect reentry. */
++      atomic_inc(nest_cnt);
+-      /* If irq pending already clear it. */
+-      if (xen_test_irq_pending(irq)) {
++      /* If irq pending already and no nested call clear it. */
++      if (atomic_read(nest_cnt) == 1 && xen_test_irq_pending(irq)) {
+               xen_clear_irq_pending(irq);
+       } else if (READ_ONCE(*byte) == val) {
+               /* Block until irq becomes pending (or a spurious wakeup) */
+               xen_poll_irq(irq);
+       }
+-      local_irq_restore(flags);
++      atomic_dec(nest_cnt);
+ }
+ #else /* CONFIG_QUEUED_SPINLOCKS */