From: Sasha Levin Date: Wed, 1 Feb 2023 16:41:56 +0000 (-0500) Subject: Fixes for 4.19 X-Git-Tag: v4.14.305~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2347193eb27a4bd6b4f86c77c05365908fda2d0;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/arm-dts-imx-fix-pca9547-i2c-mux-node-name.patch b/queue-4.19/arm-dts-imx-fix-pca9547-i2c-mux-node-name.patch new file mode 100644 index 00000000000..908a6a64bd2 --- /dev/null +++ b/queue-4.19/arm-dts-imx-fix-pca9547-i2c-mux-node-name.patch @@ -0,0 +1,43 @@ +From 28976b61ec9f842340d4f209156ba9374643b86e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 2 Dec 2022 17:49:18 +0100 +Subject: ARM: dts: imx: Fix pca9547 i2c-mux node name + +From: Geert Uytterhoeven + +[ Upstream commit f78985f9f58380eec37f82c8a2c765aa7670fc29 ] + +"make dtbs_check": + + arch/arm/boot/dts/imx53-ppd.dtb: i2c-switch@70: $nodename:0: 'i2c-switch@70' does not match '^(i2c-?)?mux' + From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml + arch/arm/boot/dts/imx53-ppd.dtb: i2c-switch@70: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@0', 'i2c@1', 'i2c@2', 'i2c@3', 'i2c@4', 'i2c@5', 'i2c@6', 'i2c@7' were unexpected) + From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml + +Fix this by renaming the PCA9547 node to "i2c-mux", to match the I2C bus +multiplexer/switch DT bindings and the Generic Names Recommendation in +the Devicetree Specification. + +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Shawn Guo +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/imx53-ppd.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts +index f346673d34ea..0cb5f01f02d1 100644 +--- a/arch/arm/boot/dts/imx53-ppd.dts ++++ b/arch/arm/boot/dts/imx53-ppd.dts +@@ -462,7 +462,7 @@ &i2c1 { + scl-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; + status = "okay"; + +- i2c-switch@70 { ++ i2c-mux@70 { + compatible = "nxp,pca9547"; + #address-cells = <1>; + #size-cells = <0>; +-- +2.39.0 + diff --git a/queue-4.19/dmaengine-imx-sdma-fix-a-possible-memory-leak-in-sdm.patch b/queue-4.19/dmaengine-imx-sdma-fix-a-possible-memory-leak-in-sdm.patch new file mode 100644 index 00000000000..f7d931aa71c --- /dev/null +++ b/queue-4.19/dmaengine-imx-sdma-fix-a-possible-memory-leak-in-sdm.patch @@ -0,0 +1,49 @@ +From 2f5fe82ecf9e726400bb7d5a204b94ad53daf1c9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 30 Nov 2022 17:08:00 +0800 +Subject: dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init + +From: Hui Wang + +[ Upstream commit 1417f59ac0b02130ee56c0c50794b9b257be3d17 ] + +If the function sdma_load_context() fails, the sdma_desc will be +freed, but the allocated desc->bd is forgot to be freed. + +We already met the sdma_load_context() failure case and the log as +below: +[ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready +... + +In this case, the desc->bd will not be freed without this change. + +Signed-off-by: Hui Wang +Reviewed-by: Sascha Hauer +Link: https://lore.kernel.org/r/20221130090800.102035-1-hui.wang@canonical.com +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +--- + drivers/dma/imx-sdma.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c +index 709ead443fc5..5794d3120bb8 100644 +--- a/drivers/dma/imx-sdma.c ++++ b/drivers/dma/imx-sdma.c +@@ -1347,10 +1347,12 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac, + sdma_config_ownership(sdmac, false, true, false); + + if (sdma_load_context(sdmac)) +- goto err_desc_out; ++ goto err_bd_out; + + return desc; + ++err_bd_out: ++ sdma_free_bd(desc); + err_desc_out: + kfree(desc); + err_out: +-- +2.39.0 + diff --git a/queue-4.19/series b/queue-4.19/series index 40d866010c6..1a3b8fae3cb 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -64,3 +64,5 @@ x86-i8259-mark-legacy-pic-interrupts-with-irq_level.patch drm-i915-display-fix-compiler-warning-about-array-overrun.patch x86-asm-fix-an-assembler-warning-with-current-binutils.patch x86-entry-64-add-instruction-suffix-to-sysret.patch +arm-dts-imx-fix-pca9547-i2c-mux-node-name.patch +dmaengine-imx-sdma-fix-a-possible-memory-leak-in-sdm.patch