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

Horatiu Vultur posted 1 patch 4 years ago
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 3 +++
1 file changed, 3 insertions(+)
[PATCH net] net: lan966x: Make sure to release ptp interrupt
Posted by Horatiu Vultur 4 years ago
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 <horatiu.vultur@microchip.com>
---
 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
Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt
Posted by patchwork-bot+netdevbpf@kernel.org 4 years ago
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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 <horatiu.vultur@microchip.com>
> ---
>  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
Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt
Posted by Jakub Kicinski 4 years ago
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 <horatiu.vultur@microchip.com>
Re: [PATCH net] net: lan966x: Make sure to release ptp interrupt
Posted by Horatiu Vultur 4 years ago
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 <horatiu.vultur@microchip.com>

-- 
/Horatiu