-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-iot2050: Add two fixes for icssg-prueth
Minor ones, just affecting the error paths, but who knows. Signed-off-by: Jan Kiszka <[email protected]>
- Loading branch information
1 parent
8b719f6
commit 23fcc58
Showing
10 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...l/linux/files/patches-6.1/0068-net-ti-icssg-prueth-Add-missing-icss_iep_put-to-erro.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Jan Kiszka <[email protected]> | ||
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. | ||
|
||
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 <[email protected]> | ||
[Taken from https://lore.kernel.org/lkml/[email protected]/] | ||
--- | ||
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c | ||
index 3557749322df..e6368d66088d 100644 | ||
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c | ||
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c | ||
@@ -2213,6 +2213,9 @@ static int prueth_probe(struct platform_device *pdev) | ||
if (prueth->pdata.quirk_10m_link_issue) | ||
icss_iep_exit_fw(prueth->iep1); | ||
|
||
+ icss_iep_put(prueth->iep1); | ||
+ icss_iep_put(prueth->iep0); | ||
+ | ||
free_pool: | ||
gen_pool_free(prueth->sram_pool, | ||
(unsigned long)prueth->msmcram.va, msmc_ram_size); |
37 changes: 37 additions & 0 deletions
37
...l/linux/files/patches-6.1/0069-net-ti-icssg-prueth-Fix-error-cleanup-on-failing-pru.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Jan Kiszka <[email protected]> | ||
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 <[email protected]> | ||
[Taken from https://lore.kernel.org/lkml/[email protected]/] | ||
--- | ||
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 e6368d66088d..230928a78437 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: |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.