From 38c0482abbf727094edf433a604f3be17243b5c3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 24 Jan 2022 15:10:30 +0100 Subject: [PATCH] 4.14-stable patches added patches: lib82596-fix-irq-check-in-sni_82596_probe.patch scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch --- ...596-fix-irq-check-in-sni_82596_probe.patch | 40 ++++++++++++++++ ...remove-broken-example-from-help-text.patch | 46 +++++++++++++++++++ queue-4.14/series | 2 + 3 files changed, 88 insertions(+) create mode 100644 queue-4.14/lib82596-fix-irq-check-in-sni_82596_probe.patch create mode 100644 queue-4.14/scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch diff --git a/queue-4.14/lib82596-fix-irq-check-in-sni_82596_probe.patch b/queue-4.14/lib82596-fix-irq-check-in-sni_82596_probe.patch new file mode 100644 index 00000000000..07e75a90783 --- /dev/null +++ b/queue-4.14/lib82596-fix-irq-check-in-sni_82596_probe.patch @@ -0,0 +1,40 @@ +From 99218cbf81bf21355a3de61cd46a706d36e900e6 Mon Sep 17 00:00:00 2001 +From: Miaoqian Lin +Date: Fri, 14 Jan 2022 06:57:24 +0000 +Subject: lib82596: Fix IRQ check in sni_82596_probe + +From: Miaoqian Lin + +commit 99218cbf81bf21355a3de61cd46a706d36e900e6 upstream. + +platform_get_irq() returns negative error number instead 0 on failure. +And the doc of platform_get_irq() provides a usage example: + + int irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + +Fix the check of return value to catch errors correctly. + +Fixes: 115978859272 ("i825xx: Move the Intel 82586/82593/82596 based drivers") +Signed-off-by: Miaoqian Lin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/i825xx/sni_82596.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/i825xx/sni_82596.c ++++ b/drivers/net/ethernet/i825xx/sni_82596.c +@@ -122,9 +122,10 @@ static int sni_82596_probe(struct platfo + netdevice->dev_addr[5] = readb(eth_addr + 0x06); + iounmap(eth_addr); + +- if (!netdevice->irq) { ++ if (netdevice->irq < 0) { + printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n", + __FILE__, netdevice->base_addr); ++ retval = netdevice->irq; + goto probe_failed; + } + diff --git a/queue-4.14/scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch b/queue-4.14/scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch new file mode 100644 index 00000000000..72656617f37 --- /dev/null +++ b/queue-4.14/scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch @@ -0,0 +1,46 @@ +From d8adf5b92a9d2205620874d498c39923ecea8749 Mon Sep 17 00:00:00 2001 +From: Matthias Schiffer +Date: Thu, 13 Jan 2022 09:19:18 +0100 +Subject: scripts/dtc: dtx_diff: remove broken example from help text + +From: Matthias Schiffer + +commit d8adf5b92a9d2205620874d498c39923ecea8749 upstream. + +dtx_diff suggests to use <(...) syntax to pipe two inputs into it, but +this has never worked: The /proc/self/fds/... paths passed by the shell +will fail the `[ -f "${dtx}" ] && [ -r "${dtx}" ]` check in compile_to_dts, +but even with this check removed, the function cannot work: hexdump will +eat up the DTB magic, making the subsequent dtc call fail, as a pipe +cannot be rewound. + +Simply remove this broken example, as there is already an alternative one +that works fine. + +Fixes: 10eadc253ddf ("dtc: create tool to diff device trees") +Signed-off-by: Matthias Schiffer +Reviewed-by: Frank Rowand +Signed-off-by: Rob Herring +Link: https://lore.kernel.org/r/20220113081918.10387-1-matthias.schiffer@ew.tq-group.com +Signed-off-by: Greg Kroah-Hartman +--- + scripts/dtc/dtx_diff | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/scripts/dtc/dtx_diff ++++ b/scripts/dtc/dtx_diff +@@ -56,12 +56,8 @@ Otherwise DTx is treated as a dts source + or '/include/' to be processed. + + If DTx_1 and DTx_2 are in different architectures, then this script +- may not work since \${ARCH} is part of the include path. Two possible +- workarounds: +- +- `basename $0` \\ +- <(ARCH=arch_of_dtx_1 `basename $0` DTx_1) \\ +- <(ARCH=arch_of_dtx_2 `basename $0` DTx_2) ++ may not work since \${ARCH} is part of the include path. The following ++ workaround can be used: + + `basename $0` ARCH=arch_of_dtx_1 DTx_1 >tmp_dtx_1.dts + `basename $0` ARCH=arch_of_dtx_2 DTx_2 >tmp_dtx_2.dts diff --git a/queue-4.14/series b/queue-4.14/series index 052973f59d2..e6c58957d3e 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -178,3 +178,5 @@ dmaengine-at_xdmac-fix-lld-view-setting.patch dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch net_sched-restore-mpu-xxx-handling.patch bcmgenet-add-wol-irq-check.patch +scripts-dtc-dtx_diff-remove-broken-example-from-help-text.patch +lib82596-fix-irq-check-in-sni_82596_probe.patch -- 2.47.2