All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
@ 2023-07-19  8:43 Rafał Miłecki
  2023-07-20 18:52 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rafał Miłecki @ 2023-07-19  8:43 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, bcm-kernel-feedback-list,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

MTD subsystem may return -EPROBE_DEFER if something isn't ready yet.
It's important to pass that error up so device will get probed later.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Add of_node_put() - thanks Miquel!
---
 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 39661e23d7d4..03764b589ec5 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -3245,6 +3245,10 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
 
 			ret = brcmnand_init_cs(host, NULL);
 			if (ret) {
+				if (ret == -EPROBE_DEFER) {
+					of_node_put(child);
+					goto err;
+				}
 				devm_kfree(dev, host);
 				continue; /* Try all chip-selects */
 			}
-- 
2.35.3


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
  2023-07-19  8:43 [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up Rafał Miłecki
@ 2023-07-20 18:52 ` Florian Fainelli
  2023-07-21  0:15 ` William Zhang
  2023-07-27 15:18 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2023-07-20 18:52 UTC (permalink / raw)
  To: Rafał Miłecki, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, bcm-kernel-feedback-list,
	Rafał Miłecki


[-- Attachment #1.1: Type: text/plain, Size: 358 bytes --]

On 7/19/23 01:43, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MTD subsystem may return -EPROBE_DEFER if something isn't ready yet.
> It's important to pass that error up so device will get probed later.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
  2023-07-19  8:43 [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up Rafał Miłecki
  2023-07-20 18:52 ` Florian Fainelli
@ 2023-07-21  0:15 ` William Zhang
  2023-07-27 15:18 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: William Zhang @ 2023-07-21  0:15 UTC (permalink / raw)
  To: Rafał Miłecki, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, bcm-kernel-feedback-list,
	Rafał Miłecki


[-- Attachment #1.1: Type: text/plain, Size: 1076 bytes --]



On 07/19/2023 01:43 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MTD subsystem may return -EPROBE_DEFER if something isn't ready yet.
> It's important to pass that error up so device will get probed later.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Add of_node_put() - thanks Miquel!
> ---
>   drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> index 39661e23d7d4..03764b589ec5 100644
> --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> @@ -3245,6 +3245,10 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
>   
>   			ret = brcmnand_init_cs(host, NULL);
>   			if (ret) {
> +				if (ret == -EPROBE_DEFER) {
> +					of_node_put(child);
> +					goto err;
> +				}
>   				devm_kfree(dev, host);
>   				continue; /* Try all chip-selects */
>   			}
> 

Acked-by: William Zhang <william.zhang@broadcom.com>

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
  2023-07-19  8:43 [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up Rafał Miłecki
  2023-07-20 18:52 ` Florian Fainelli
  2023-07-21  0:15 ` William Zhang
@ 2023-07-27 15:18 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-07-27 15:18 UTC (permalink / raw)
  To: Rafał Miłecki, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, bcm-kernel-feedback-list,
	Rafał Miłecki

On Wed, 2023-07-19 at 08:43:24 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MTD subsystem may return -EPROBE_DEFER if something isn't ready yet.
> It's important to pass that error up so device will get probed later.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Acked-by: William Zhang <william.zhang@broadcom.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19  8:43 [PATCH V2] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up Rafał Miłecki
2023-07-20 18:52 ` Florian Fainelli
2023-07-21  0:15 ` William Zhang
2023-07-27 15:18 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.