2019-04-24 13:25:16

by Fabien DESSENNE

[permalink] [raw]
Subject: [PATCH] net: ethernet: stmmac: manage the get_irq probe defer case

Manage the -EPROBE_DEFER error case for "stm32_pwr_wakeup" IRQ.

Signed-off-by: Fabien Dessenne <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 062a600f..2142853 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -333,6 +333,9 @@ static int stm32mp1_parse_data(struct stm32_dwmac *dwmac,
*/
dwmac->irq_pwr_wakeup = platform_get_irq_byname(pdev,
"stm32_pwr_wakeup");
+ if (dwmac->irq_pwr_wakeup == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+
if (!dwmac->clk_eth_ck && dwmac->irq_pwr_wakeup >= 0) {
err = device_init_wakeup(&pdev->dev, true);
if (err) {
--
2.7.4


2019-04-24 13:25:26

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH] net: ethernet: stmmac: manage the get_irq probe defer case

Hi

On 4/24/19 11:35 AM, Fabien Dessenne wrote:
> Manage the -EPROBE_DEFER error case for "stm32_pwr_wakeup" IRQ.
>
> Signed-off-by: Fabien Dessenne <[email protected]>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> index 062a600f..2142853 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> @@ -333,6 +333,9 @@ static int stm32mp1_parse_data(struct stm32_dwmac *dwmac,
> */
> dwmac->irq_pwr_wakeup = platform_get_irq_byname(pdev,
> "stm32_pwr_wakeup");
> + if (dwmac->irq_pwr_wakeup == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> +
> if (!dwmac->clk_eth_ck && dwmac->irq_pwr_wakeup >= 0) {
> err = device_init_wakeup(&pdev->dev, true);
> if (err) {
>

Acked-by: Alexandre TORGUE <[email protected]>

2019-04-26 15:28:44

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: ethernet: stmmac: manage the get_irq probe defer case

From: Fabien Dessenne <[email protected]>
Date: Wed, 24 Apr 2019 11:35:49 +0200

> Manage the -EPROBE_DEFER error case for "stm32_pwr_wakeup" IRQ.
>
> Signed-off-by: Fabien Dessenne <[email protected]>

Applied, thank you.