2022-04-14 14:57:02

by Horatiu Vultur

[permalink] [raw]
Subject: [PATCH net] net: lan966x: Make sure to release ptp interrupt

When the lan966x driver is removed make sure to remove also the ptp_irq
IRQ.

Fixes: e85a96e48e3309 ("net: lan966x: Add support for ptp interrupts")
Signed-off-by: Horatiu Vultur <[email protected]>
---
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index 958e55596b82..95830e3e2b1f 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -671,6 +671,9 @@ static void lan966x_cleanup_ports(struct lan966x *lan966x)
disable_irq(lan966x->ana_irq);
lan966x->ana_irq = -ENXIO;
}
+
+ if (lan966x->ptp_irq)
+ devm_free_irq(lan966x->dev, lan966x->ptp_irq, lan966x);
}

static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
--
2.33.0


2022-04-16 02:02:01

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

On Wed, 13 Apr 2022 21:57:16 +0200 you wrote:
> When the lan966x driver is removed make sure to remove also the ptp_irq
> IRQ.
>
> Fixes: e85a96e48e3309 ("net: lan966x: Add support for ptp interrupts")
> Signed-off-by: Horatiu Vultur <[email protected]>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 3 +++
> 1 file changed, 3 insertions(+)

Here is the summary with links:
- [net] net: lan966x: Make sure to release ptp interrupt
https://git.kernel.org/netdev/net/c/d08ed852560e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


2022-04-16 02:06:27

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt

On Wed, 13 Apr 2022 21:57:16 +0200 Horatiu Vultur wrote:
> When the lan966x driver is removed make sure to remove also the ptp_irq
> IRQ.

I presume it's because you want to disable the IRQ so it doesn't fire
during / after remove? Would be good to have such justifications
spelled out in the commit message in the future!

> Fixes: e85a96e48e3309 ("net: lan966x: Add support for ptp interrupts")
> Signed-off-by: Horatiu Vultur <[email protected]>

2022-04-22 19:45:00

by Horatiu Vultur

[permalink] [raw]
Subject: Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt

The 04/15/2022 21:01, Jakub Kicinski wrote:
>
> On Wed, 13 Apr 2022 21:57:16 +0200 Horatiu Vultur wrote:
> > When the lan966x driver is removed make sure to remove also the ptp_irq
> > IRQ.
>
> I presume it's because you want to disable the IRQ so it doesn't fire
> during / after remove? Would be good to have such justifications
> spelled out in the commit message in the future!

Sorry about this. I will improve the commit messages in the future.

>
> > Fixes: e85a96e48e3309 ("net: lan966x: Add support for ptp interrupts")
> > Signed-off-by: Horatiu Vultur <[email protected]>

--
/Horatiu