From: Greg Kroah-Hartman Date: Sun, 9 Feb 2020 21:03:28 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.19.103~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52240ae1c5ceefa69e3691e5d5ae0568002d5535;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches 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 --- diff --git a/queue-4.9/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch b/queue-4.9/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch new file mode 100644 index 00000000000..93a1dd29f3c --- /dev/null +++ b/queue-4.9/asoc-sgtl5000-fix-vdda-and-vddio-comparison.patch @@ -0,0 +1,43 @@ +From e19ecbf105b236a6334fab64d8fd5437b12ee019 Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Fri, 20 Dec 2019 17:44:50 +0100 +Subject: ASoC: sgtl5000: Fix VDDA and VDDIO comparison + +From: Marek Vasut + +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 +Cc: Fabio Estevam +Cc: Igor Opaniuk +Cc: Marcel Ziswiler +Cc: Mark Brown +Cc: Oleksandr Suvorov +Link: https://lore.kernel.org/r/20191220164450.1395038-2-marex@denx.de +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1165,7 +1165,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.9/mfd-da9062-fix-watchdog-compatible-string.patch b/queue-4.9/mfd-da9062-fix-watchdog-compatible-string.patch new file mode 100644 index 00000000000..48aa0ab5e98 --- /dev/null +++ b/queue-4.9/mfd-da9062-fix-watchdog-compatible-string.patch @@ -0,0 +1,35 @@ +From 1112ba02ff1190ca9c15a912f9269e54b46d2d82 Mon Sep 17 00:00:00 2001 +From: Marco Felsch +Date: Wed, 8 Jan 2020 10:57:02 +0100 +Subject: mfd: da9062: Fix watchdog compatible string + +From: Marco Felsch + +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 +Acked-by: Guenter Roeck +Reviewed-by: Adam Thomson +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -142,7 +142,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.9/mfd-rn5t618-mark-adc-control-register-volatile.patch b/queue-4.9/mfd-rn5t618-mark-adc-control-register-volatile.patch new file mode 100644 index 00000000000..571122f8afc --- /dev/null +++ b/queue-4.9/mfd-rn5t618-mark-adc-control-register-volatile.patch @@ -0,0 +1,30 @@ +From 2f3dc25c0118de03a00ddc88b61f7216854f534d Mon Sep 17 00:00:00 2001 +From: Andreas Kemnade +Date: Fri, 17 Jan 2020 22:59:22 +0100 +Subject: mfd: rn5t618: Mark ADC control register volatile + +From: Andreas Kemnade + +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 +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + 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: diff --git a/queue-4.9/series b/queue-4.9/series index f73ab7d2a5a..fde49f5fc49 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -67,3 +67,8 @@ net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch ib-mlx5-fix-outstanding_pi-index-for-gsi-qps.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.9/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch b/queue-4.9/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch new file mode 100644 index 00000000000..cfefa154a39 --- /dev/null +++ b/queue-4.9/ubi-fastmap-fix-inverted-logic-in-seen-selfcheck.patch @@ -0,0 +1,34 @@ +From ef5aafb6e4e9942a28cd300bdcda21ce6cbaf045 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 23 Oct 2019 11:58:12 +0200 +Subject: ubi: fastmap: Fix inverted logic in seen selfcheck + +From: Sascha Hauer + +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 +Signed-off-by: Richard Weinberger +Signed-off-by: Greg Kroah-Hartman + +--- + 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.9/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch b/queue-4.9/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch new file mode 100644 index 00000000000..9759fb0bb4d --- /dev/null +++ b/queue-4.9/ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch @@ -0,0 +1,97 @@ +From 5d3805af279c93ef49a64701f35254676d709622 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 13 Jan 2020 16:23:46 +0300 +Subject: ubi: Fix an error pointer dereference in error handling code + +From: Dan Carpenter + +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 +Signed-off-by: Richard Weinberger +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1127,7 +1127,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); +@@ -1141,7 +1141,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); +@@ -1150,7 +1150,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); +@@ -1318,7 +1318,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++) { +@@ -1340,7 +1340,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; + } + } + +@@ -1350,7 +1350,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; + } + } + +@@ -1360,10 +1360,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; + }