From e15fe5a26db2cd874b75df7cf910a958a805c8d4 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 6 Nov 2023 10:55:10 +0100 Subject: [PATCH] linux-iot2050: Add two fixes for icssg-prueth Minor ones, just affecting the error paths, but who knows. Signed-off-by: Jan Kiszka --- ...eth-Add-missing-icss_iep_put-to-erro.patch | 44 +++++++++++++++++++ ...eth-Fix-error-cleanup-on-failing-pru.patch | 37 ++++++++++++++++ ...ts-ti-iot2050-Drop-unused-ecap0-PWM.patch} | 0 ...050-Definitions-for-runtime-pinmuxi.patch} | 0 ...050-Refactor-the-m.2-and-minipcie-p.patch} | 0 ...050-Add-icssg-prueth-nodes-for-PG2-.patch} | 0 ...iot2050-Add-node-for-generic-spidev.patch} | 0 ...cate-the-green-light-is-off-when-pa.patch} | 0 ...-setting-the-RJ45-port-led-behavior.patch} | 0 ...tend-led-panic-indicator-on-and-off.patch} | 0 10 files changed, 81 insertions(+) create mode 100644 recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch create mode 100644 recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch rename recipes-kernel/linux/files/patches-6.1/{0068-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch => 0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0069-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch => 0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0070-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch => 0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0071-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch => 0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0072-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch => 0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0073-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch => 0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0074-HACK-setting-the-RJ45-port-led-behavior.patch => 0076-HACK-setting-the-RJ45-port-led-behavior.patch} (100%) rename recipes-kernel/linux/files/patches-6.1/{0075-WIP-feat-extend-led-panic-indicator-on-and-off.patch => 0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch} (100%) diff --git a/recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch b/recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch new file mode 100644 index 000000000..9f858af5c --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Thu, 2 Nov 2023 16:54:32 +0100 +Subject: [PATCH] net: ti: icssg-prueth: Add missing icss_iep_put to error path + +Analogously to prueth_remove, just also taking care for NULL'ing the +iep pointers. + +Fixes: 186734c15886 ("net: ti: icssg-prueth: add packet timestamping and ptp support") +Fixes: 443a2367ba3c ("net: ti: icssg-prueth: am65x SR2.0 add 10M full duplex support") +Signed-off-by: Jan Kiszka +--- + drivers/net/ethernet/ti/icssg/icssg_prueth.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c +index 3557749322df..fb445823b434 100644 +--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c ++++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c +@@ -2112,10 +2112,7 @@ static int prueth_probe(struct platform_device *pdev) + prueth->iep1 = icss_iep_get_idx(np, 1); + if (IS_ERR(prueth->iep1)) { + ret = dev_err_probe(dev, PTR_ERR(prueth->iep1), "iep1 get failed\n"); +- icss_iep_put(prueth->iep0); +- prueth->iep0 = NULL; +- prueth->iep1 = NULL; +- goto free_pool; ++ goto put_iep0; + } + + if (prueth->pdata.quirk_10m_link_issue) { +@@ -2212,6 +2209,12 @@ static int prueth_probe(struct platform_device *pdev) + exit_iep: + if (prueth->pdata.quirk_10m_link_issue) + icss_iep_exit_fw(prueth->iep1); ++ icss_iep_put(prueth->iep1); ++ ++put_iep0: ++ icss_iep_put(prueth->iep0); ++ prueth->iep0 = NULL; ++ prueth->iep1 = NULL; + + free_pool: + gen_pool_free(prueth->sram_pool, diff --git a/recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch b/recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch new file mode 100644 index 000000000..03f6022e9 --- /dev/null +++ b/recipes-kernel/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Fri, 3 Nov 2023 10:09:50 +0100 +Subject: [PATCH] net: ti: icssg-prueth: Fix error cleanup on failing + pruss_request_mem_region + +We were just continuing in this case, surely not desired. + +Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver") +Signed-off-by: Jan Kiszka +[Taken from https://lore.kernel.org/lkml/06ed13ca-9f52-4b49-9178-aae245bfd958@siemens.com/] +--- + drivers/net/ethernet/ti/icssg/icssg_prueth.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c +index fb445823b434..2b22e98dd677 100644 +--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c ++++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c +@@ -2070,7 +2070,7 @@ static int prueth_probe(struct platform_device *pdev) + &prueth->shram); + if (ret) { + dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret); +- pruss_put(prueth->pruss); ++ goto put_pruss; + } + + prueth->sram_pool = of_gen_pool_get(np, "sram", 0); +@@ -2222,6 +2222,8 @@ static int prueth_probe(struct platform_device *pdev) + + put_mem: + pruss_release_mem_region(prueth->pruss, &prueth->shram); ++ ++put_pruss: + pruss_put(prueth->pruss); + + put_cores: diff --git a/recipes-kernel/linux/files/patches-6.1/0068-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch b/recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0068-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch rename to recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Drop-unused-ecap0-PWM.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0069-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch b/recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0069-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch rename to recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Definitions-for-runtime-pinmuxi.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch b/recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0070-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch rename to recipes-kernel/linux/files/patches-6.1/0072-arm64-dts-ti-iot2050-Refactor-the-m.2-and-minipcie-p.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch b/recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0071-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch rename to recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-iot2050-Add-icssg-prueth-nodes-for-PG2-.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0072-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch b/recipes-kernel/linux/files/patches-6.1/0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0072-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch rename to recipes-kernel/linux/files/patches-6.1/0074-WIP-arm64-dts-ti-iot2050-Add-node-for-generic-spidev.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch b/recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0073-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch rename to recipes-kernel/linux/files/patches-6.1/0075-arm64-dts-ti-Indicate-the-green-light-is-off-when-pa.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0074-HACK-setting-the-RJ45-port-led-behavior.patch b/recipes-kernel/linux/files/patches-6.1/0076-HACK-setting-the-RJ45-port-led-behavior.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0074-HACK-setting-the-RJ45-port-led-behavior.patch rename to recipes-kernel/linux/files/patches-6.1/0076-HACK-setting-the-RJ45-port-led-behavior.patch diff --git a/recipes-kernel/linux/files/patches-6.1/0075-WIP-feat-extend-led-panic-indicator-on-and-off.patch b/recipes-kernel/linux/files/patches-6.1/0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch similarity index 100% rename from recipes-kernel/linux/files/patches-6.1/0075-WIP-feat-extend-led-panic-indicator-on-and-off.patch rename to recipes-kernel/linux/files/patches-6.1/0077-WIP-feat-extend-led-panic-indicator-on-and-off.patch