]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Feb 2022 07:17:15 +0000 (08:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Feb 2022 07:17:15 +0000 (08:17 +0100)
added patches:
dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch
i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch

queue-4.14/dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch [new file with mode: 0644]
queue-4.14/i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch b/queue-4.14/dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch
new file mode 100644 (file)
index 0000000..0deb224
--- /dev/null
@@ -0,0 +1,37 @@
+From 2d21543efe332cd8c8f212fb7d365bc8b0690bfa Mon Sep 17 00:00:00 2001
+From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+Date: Thu, 6 Jan 2022 11:09:39 +0800
+Subject: dmaengine: sh: rcar-dmac: Check for error num after setting mask
+
+From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+
+commit 2d21543efe332cd8c8f212fb7d365bc8b0690bfa upstream.
+
+Because of the possible failure of the dma_supported(), the
+dma_set_mask_and_coherent() may return error num.
+Therefore, it should be better to check it and return the error if
+fails.
+
+Fixes: dc312349e875 ("dmaengine: rcar-dmac: Widen DMA mask to 40 bits")
+Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Link: https://lore.kernel.org/r/20220106030939.2644320-1-jiasheng@iscas.ac.cn
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/sh/rcar-dmac.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/dma/sh/rcar-dmac.c
++++ b/drivers/dma/sh/rcar-dmac.c
+@@ -1767,7 +1767,9 @@ static int rcar_dmac_probe(struct platfo
+       platform_set_drvdata(pdev, dmac);
+       dmac->dev->dma_parms = &dmac->parms;
+       dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK);
+-      dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40));
++      ret = dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40));
++      if (ret)
++              return ret;
+       ret = rcar_dmac_parse_of(&pdev->dev, dmac);
+       if (ret < 0)
diff --git a/queue-4.14/i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch b/queue-4.14/i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch
new file mode 100644 (file)
index 0000000..3e85bf4
--- /dev/null
@@ -0,0 +1,36 @@
+From 834cea3a252ed4847db076a769ad9efe06afe2d5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Tue, 15 Feb 2022 08:27:35 +0100
+Subject: i2c: brcmstb: fix support for DSL and CM variants
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rafał Miłecki <rafal@milecki.pl>
+
+commit 834cea3a252ed4847db076a769ad9efe06afe2d5 upstream.
+
+DSL and CM (Cable Modem) support 8 B max transfer size and have a custom
+DT binding for that reason. This driver was checking for a wrong
+"compatible" however which resulted in an incorrect setup.
+
+Fixes: e2e5a2c61837 ("i2c: brcmstb: Adding support for CM and DSL SoCs")
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Acked-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-brcmstb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-brcmstb.c
++++ b/drivers/i2c/busses/i2c-brcmstb.c
+@@ -645,7 +645,7 @@ static int brcmstb_i2c_probe(struct plat
+       /* set the data in/out register size for compatible SoCs */
+       if (of_device_is_compatible(dev->device->of_node,
+-                                  "brcmstb,brcmper-i2c"))
++                                  "brcm,brcmper-i2c"))
+               dev->data_regsz = sizeof(u8);
+       else
+               dev->data_regsz = sizeof(u32);
index 3e33bfe67b80270ed119ea0f6f19692005ac3345..ef0feeaf1e3a7f202ac8f15625dcd2bb421d1c92 100644 (file)
@@ -32,6 +32,8 @@ powerpc-lib-sstep-fix-ptesync-build-error.patch
 nfs-lookup_directory-is-also-ok-with-symlinks.patch
 edac-fix-calculation-of-returned-address-and-next-offset-in-edac_align_ptr.patch
 net-sched-limit-tc_act_repeat-loops.patch
+dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch
+i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch
 mtd-rawnand-brcmnand-refactored-code-to-introduce-he.patch
 mtd-rawnand-brcmnand-fixed-incorrect-sub-page-ecc-st.patch
 kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch