Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
@ 2026-08-18 12:41 Jiawen Liu
  2026-08-18 13:01 ` Michael Dege
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiawen Liu @ 2026-08-18 12:41 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-renesas-soc, linux-kernel
  Cc: Yoshihiro Shimoda, jiawen

From: jiawen <1298662399@qq.com>

Update renesas_eth_sw_probe() for the confirmed driver lifecycle defect.

Keep the change limited to the concrete operation shown in the final
patch.

Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c
--- a/drivers/net/ethernet/renesas/rswitch_main.c
+++ b/drivers/net/ethernet/renesas/rswitch_main.c
@@ -2123,6 +2123,8 @@
 	{ /* Sentinel */ }
 };
 
+static void rswitch_deinit(struct rswitch_private *priv);
+
 static int renesas_eth_sw_probe(struct platform_device *pdev)
 {
 	const struct soc_device_attribute *attr;
@@ -2194,6 +2196,9 @@
 	ret = rswitch_register_notifiers();
 	if (ret) {
 		dev_err(&pdev->dev, "could not register notifiers\n");
+		rswitch_deinit(priv);
+		pm_runtime_put(&pdev->dev);
+		pm_runtime_disable(&pdev->dev);
 		return ret;
 	}
 


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

* RE: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
  2026-08-18 12:41 [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup Jiawen Liu
@ 2026-08-18 13:01 ` Michael Dege
  2026-08-18 13:06 ` Geert Uytterhoeven
  2026-08-18 15:00 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Dege @ 2026-08-18 13:01 UTC (permalink / raw)
  To: Jiawen Liu, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: Yoshihiro Shimoda

Hi Jiawen,

Thank you for your patch.

> -----Original Message-----
> From: Jiawen Liu <1298662399@qq.com>
> Sent: Tuesday, August 18, 2026 2:42 PM
> To: Andrew Lunn <andrew+netdev@lunn.ch>; David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>;
> netdev@vger.kernel.org; linux-renesas-soc@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; jiawen <1298662399@qq.com>
> Subject: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
> 
> [You don't often get email from 1298662399@qq.com. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> From: jiawen <1298662399@qq.com>
> 
> Update renesas_eth_sw_probe() for the confirmed driver lifecycle defect.
> 
> Keep the change limited to the concrete operation shown in the final patch.
> 
> Signed-off-by: jiawen <1298662399@qq.com>

Reviewed-by: Michael Dege <Michael.dege@renesas.com >

> ---
> diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c
> --- a/drivers/net/ethernet/renesas/rswitch_main.c
> +++ b/drivers/net/ethernet/renesas/rswitch_main.c
> @@ -2123,6 +2123,8 @@
>         { /* Sentinel */ }
>  };
> 
> +static void rswitch_deinit(struct rswitch_private *priv);
> +
>  static int renesas_eth_sw_probe(struct platform_device *pdev)  {
>         const struct soc_device_attribute *attr; @@ -2194,6 +2196,9 @@
>         ret = rswitch_register_notifiers();
>         if (ret) {
>                 dev_err(&pdev->dev, "could not register notifiers\n");
> +               rswitch_deinit(priv);
> +               pm_runtime_put(&pdev->dev);
> +               pm_runtime_disable(&pdev->dev);
>                 return ret;
>         }
> 
> 


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

* Re: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
  2026-08-18 12:41 [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup Jiawen Liu
  2026-08-18 13:01 ` Michael Dege
@ 2026-08-18 13:06 ` Geert Uytterhoeven
  2026-08-18 15:00 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-18 13:06 UTC (permalink / raw)
  To: Jiawen Liu
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-renesas-soc, linux-kernel,
	Yoshihiro Shimoda

Hi Jiawen,

Thanks for your patch!

On Tue, 18 Aug 2026 at 14:44, Jiawen Liu <1298662399@qq.com> wrote:
> From: jiawen <1298662399@qq.com>
>
> Update renesas_eth_sw_probe() for the confirmed driver lifecycle defect.
>
> Keep the change limited to the concrete operation shown in the final
> patch.

Please write a better patch description.

>
> Signed-off-by: jiawen <1298662399@qq.com>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
  2026-08-18 12:41 [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup Jiawen Liu
  2026-08-18 13:01 ` Michael Dege
  2026-08-18 13:06 ` Geert Uytterhoeven
@ 2026-08-18 15:00 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2026-08-18 15:00 UTC (permalink / raw)
  To: Jiawen Liu
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-renesas-soc, linux-kernel,
	Yoshihiro Shimoda

On Tue, Aug 18, 2026 at 04:41:35PM +0400, Jiawen Liu wrote:
> From: jiawen <1298662399@qq.com>
> 
> Update renesas_eth_sw_probe() for the confirmed driver lifecycle defect.
> 
> Keep the change limited to the concrete operation shown in the final
> patch.
> 
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c
> --- a/drivers/net/ethernet/renesas/rswitch_main.c
> +++ b/drivers/net/ethernet/renesas/rswitch_main.c
> @@ -2123,6 +2123,8 @@
>  	{ /* Sentinel */ }
>  };
>  
> +static void rswitch_deinit(struct rswitch_private *priv);
> +

Please don't add forward references. Add a patch which first moves
this function earlier. Then fix the issue.

    Andrew

---
pw-bot: cr

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

end of thread, other threads:[~2026-08-18 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 12:41 [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup Jiawen Liu
2026-08-18 13:01 ` Michael Dege
2026-08-18 13:06 ` Geert Uytterhoeven
2026-08-18 15:00 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox