]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Feb 2020 21:03:30 +0000 (22:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Feb 2020 21:03:30 +0000 (22:03 +0100)
added patches:
asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch
mfd-da9062-fix-watchdog-compatible-string.patch
mfd-rn5t618-mark-adc-control-register-volatile.patch
ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch
ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch

queue-4.14/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch [new file with mode: 0644]
queue-4.14/mfd-da9062-fix-watchdog-compatible-string.patch [new file with mode: 0644]
queue-4.14/mfd-rn5t618-mark-adc-control-register-volatile.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch [new file with mode: 0644]
queue-4.14/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch [new file with mode: 0644]

diff --git a/queue-4.14/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch b/queue-4.14/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch
new file mode 100644 (file)
index 0000000..662ad52
--- /dev/null
@@ -0,0 +1,43 @@
+From e19ecbf105b236a6334fab64d8fd5437b12ee019 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Fri, 20 Dec 2019 17:44:50 +0100
+Subject: ASoC: sgtl5000: Fix VDDA and VDDIO comparison
+
+From: Marek Vasut <marex@denx.de>
+
+commit e19ecbf105b236a6334fab64d8fd5437b12ee019 upstream.
+
+Comparing the voltage of VDDA and VDDIO to determine whether or not to
+enable VDDC manual override is insufficient. This is a problem in case
+the VDDA is supplied from different regulator than VDDIO, while both
+report the same voltage to the regulator framework. In that case where
+VDDA and VDDIO is supplied by different regulators, the VDDC manual
+override must not be applied.
+
+Fixes: b6319b061ba2 ("ASoC: sgtl5000: Fix charge pump source assignment")
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Fabio Estevam <festevam@gmail.com>
+Cc: Igor Opaniuk <igor.opaniuk@toradex.com>
+Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Cc: Mark Brown <broonie@kernel.org>
+Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
+Link: https://lore.kernel.org/r/20191220164450.1395038-2-marex@denx.de
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/sgtl5000.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/sgtl5000.c
++++ b/sound/soc/codecs/sgtl5000.c
+@@ -1262,7 +1262,8 @@ static int sgtl5000_set_power_regs(struc
+                * if vddio == vdda the source of charge pump should be
+                * assigned manually to VDDIO
+                */
+-              if (vddio == vdda) {
++              if (regulator_is_equal(sgtl5000->supplies[VDDA].consumer,
++                                     sgtl5000->supplies[VDDIO].consumer)) {
+                       lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
+                       lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
+                                   SGTL5000_VDDC_MAN_ASSN_SHIFT;
diff --git a/queue-4.14/mfd-da9062-fix-watchdog-compatible-string.patch b/queue-4.14/mfd-da9062-fix-watchdog-compatible-string.patch
new file mode 100644 (file)
index 0000000..040e568
--- /dev/null
@@ -0,0 +1,35 @@
+From 1112ba02ff1190ca9c15a912f9269e54b46d2d82 Mon Sep 17 00:00:00 2001
+From: Marco Felsch <m.felsch@pengutronix.de>
+Date: Wed, 8 Jan 2020 10:57:02 +0100
+Subject: mfd: da9062: Fix watchdog compatible string
+
+From: Marco Felsch <m.felsch@pengutronix.de>
+
+commit 1112ba02ff1190ca9c15a912f9269e54b46d2d82 upstream.
+
+The watchdog driver compatible is "dlg,da9062-watchdog" and not
+"dlg,da9062-wdt". Therefore the mfd-core can't populate the of_node and
+fwnode. As result the watchdog driver can't parse the devicetree.
+
+Fixes: 9b40b030c4ad ("mfd: da9062: Supply core driver")
+Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
+Acked-by: Guenter Roeck <linux@roeck-us.net>
+Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/da9062-core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mfd/da9062-core.c
++++ b/drivers/mfd/da9062-core.c
+@@ -257,7 +257,7 @@ static const struct mfd_cell da9062_devs
+               .name           = "da9062-watchdog",
+               .num_resources  = ARRAY_SIZE(da9062_wdt_resources),
+               .resources      = da9062_wdt_resources,
+-              .of_compatible  = "dlg,da9062-wdt",
++              .of_compatible  = "dlg,da9062-watchdog",
+       },
+       {
+               .name           = "da9062-thermal",
diff --git a/queue-4.14/mfd-rn5t618-mark-adc-control-register-volatile.patch b/queue-4.14/mfd-rn5t618-mark-adc-control-register-volatile.patch
new file mode 100644 (file)
index 0000000..571122f
--- /dev/null
@@ -0,0 +1,30 @@
+From 2f3dc25c0118de03a00ddc88b61f7216854f534d Mon Sep 17 00:00:00 2001
+From: Andreas Kemnade <andreas@kemnade.info>
+Date: Fri, 17 Jan 2020 22:59:22 +0100
+Subject: mfd: rn5t618: Mark ADC control register volatile
+
+From: Andreas Kemnade <andreas@kemnade.info>
+
+commit 2f3dc25c0118de03a00ddc88b61f7216854f534d upstream.
+
+There is a bit which gets cleared after conversion.
+
+Fixes: 9bb9e29c78f8 ("mfd: Add Ricoh RN5T618 PMIC core driver")
+Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/rn5t618.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mfd/rn5t618.c
++++ b/drivers/mfd/rn5t618.c
+@@ -32,6 +32,7 @@ static bool rn5t618_volatile_reg(struct
+       case RN5T618_WATCHDOGCNT:
+       case RN5T618_DCIRQ:
+       case RN5T618_ILIMDATAH ... RN5T618_AIN0DATAL:
++      case RN5T618_ADCCNT3:
+       case RN5T618_IR_ADC1 ... RN5T618_IR_ADC3:
+       case RN5T618_IR_GPR:
+       case RN5T618_IR_GPF:
index 6cd2375180cb055e103fd2a57eb1a7c00b79104f..f5d88e00f73190f74653341d05e5c7740b7c5bfd 100644 (file)
@@ -105,3 +105,8 @@ ib-mlx5-fix-outstanding_pi-index-for-gsi-qps.patch
 ib-core-fix-odp-get-user-pages-flow.patch
 nfsd-fix-delay-timer-on-32-bit-architectures.patch
 nfsd-fix-jiffies-time_t-mixup-in-lru-list.patch
+ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch
+ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch
+asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch
+mfd-da9062-fix-watchdog-compatible-string.patch
+mfd-rn5t618-mark-adc-control-register-volatile.patch
diff --git a/queue-4.14/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch b/queue-4.14/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch
new file mode 100644 (file)
index 0000000..cfefa15
--- /dev/null
@@ -0,0 +1,34 @@
+From ef5aafb6e4e9942a28cd300bdcda21ce6cbaf045 Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Wed, 23 Oct 2019 11:58:12 +0200
+Subject: ubi: fastmap: Fix inverted logic in seen selfcheck
+
+From: Sascha Hauer <s.hauer@pengutronix.de>
+
+commit ef5aafb6e4e9942a28cd300bdcda21ce6cbaf045 upstream.
+
+set_seen() sets the bit corresponding to the PEB number in the bitmap,
+so when self_check_seen() wants to find PEBs that haven't been seen we
+have to print the PEBs that have their bit cleared, not the ones which
+have it set.
+
+Fixes: 5d71afb00840 ("ubi: Use bitmaps in Fastmap self-check code")
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/ubi/fastmap.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/ubi/fastmap.c
++++ b/drivers/mtd/ubi/fastmap.c
+@@ -73,7 +73,7 @@ static int self_check_seen(struct ubi_de
+               return 0;
+       for (pnum = 0; pnum < ubi->peb_count; pnum++) {
+-              if (test_bit(pnum, seen) && ubi->lookuptbl[pnum]) {
++              if (!test_bit(pnum, seen) && ubi->lookuptbl[pnum]) {
+                       ubi_err(ubi, "self-check failed for PEB %d, fastmap didn't see it", pnum);
+                       ret = -EINVAL;
+               }
diff --git a/queue-4.14/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch b/queue-4.14/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch
new file mode 100644 (file)
index 0000000..7478e4b
--- /dev/null
@@ -0,0 +1,97 @@
+From 5d3805af279c93ef49a64701f35254676d709622 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Mon, 13 Jan 2020 16:23:46 +0300
+Subject: ubi: Fix an error pointer dereference in error handling code
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 5d3805af279c93ef49a64701f35254676d709622 upstream.
+
+If "seen_pebs = init_seen(ubi);" fails then "seen_pebs" is an error pointer
+and we try to kfree() it which results in an Oops.
+
+This patch re-arranges the error handling so now it only frees things
+which have been allocated successfully.
+
+Fixes: daef3dd1f0ae ("UBI: Fastmap: Add self check to detect absent PEBs")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/ubi/fastmap.c |   21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+--- a/drivers/mtd/ubi/fastmap.c
++++ b/drivers/mtd/ubi/fastmap.c
+@@ -1147,7 +1147,7 @@ static int ubi_write_fastmap(struct ubi_
+       struct rb_node *tmp_rb;
+       int ret, i, j, free_peb_count, used_peb_count, vol_count;
+       int scrub_peb_count, erase_peb_count;
+-      unsigned long *seen_pebs = NULL;
++      unsigned long *seen_pebs;
+       fm_raw = ubi->fm_buf;
+       memset(ubi->fm_buf, 0, ubi->fm_size);
+@@ -1161,7 +1161,7 @@ static int ubi_write_fastmap(struct ubi_
+       dvbuf = new_fm_vbuf(ubi, UBI_FM_DATA_VOLUME_ID);
+       if (!dvbuf) {
+               ret = -ENOMEM;
+-              goto out_kfree;
++              goto out_free_avbuf;
+       }
+       avhdr = ubi_get_vid_hdr(avbuf);
+@@ -1170,7 +1170,7 @@ static int ubi_write_fastmap(struct ubi_
+       seen_pebs = init_seen(ubi);
+       if (IS_ERR(seen_pebs)) {
+               ret = PTR_ERR(seen_pebs);
+-              goto out_kfree;
++              goto out_free_dvbuf;
+       }
+       spin_lock(&ubi->volumes_lock);
+@@ -1338,7 +1338,7 @@ static int ubi_write_fastmap(struct ubi_
+       ret = ubi_io_write_vid_hdr(ubi, new_fm->e[0]->pnum, avbuf);
+       if (ret) {
+               ubi_err(ubi, "unable to write vid_hdr to fastmap SB!");
+-              goto out_kfree;
++              goto out_free_seen;
+       }
+       for (i = 0; i < new_fm->used_blocks; i++) {
+@@ -1360,7 +1360,7 @@ static int ubi_write_fastmap(struct ubi_
+               if (ret) {
+                       ubi_err(ubi, "unable to write vid_hdr to PEB %i!",
+                               new_fm->e[i]->pnum);
+-                      goto out_kfree;
++                      goto out_free_seen;
+               }
+       }
+@@ -1370,7 +1370,7 @@ static int ubi_write_fastmap(struct ubi_
+               if (ret) {
+                       ubi_err(ubi, "unable to write fastmap to PEB %i!",
+                               new_fm->e[i]->pnum);
+-                      goto out_kfree;
++                      goto out_free_seen;
+               }
+       }
+@@ -1380,10 +1380,13 @@ static int ubi_write_fastmap(struct ubi_
+       ret = self_check_seen(ubi, seen_pebs);
+       dbg_bld("fastmap written!");
+-out_kfree:
+-      ubi_free_vid_buf(avbuf);
+-      ubi_free_vid_buf(dvbuf);
++out_free_seen:
+       free_seen(seen_pebs);
++out_free_dvbuf:
++      ubi_free_vid_buf(dvbuf);
++out_free_avbuf:
++      ubi_free_vid_buf(avbuf);
++
+ out:
+       return ret;
+ }