diff mbox series

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

Message ID 20220413195716.3796467-1-horatiu.vultur@microchip.com (mailing list archive)
State Accepted
Commit d08ed852560eb71445547f3df7b05bf5c5c69cc4
Delegated to: Netdev Maintainers
Headers show
Series [net] net: lan966x: Make sure to release ptp interrupt | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Horatiu Vultur April 13, 2022, 7:57 p.m. UTC
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(+)

Comments

Jakub Kicinski April 15, 2022, 7:01 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org April 15, 2022, 9:50 p.m. UTC | #2
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!
Horatiu Vultur April 19, 2022, 6:30 a.m. UTC | #3
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>
diff mbox series

Patch

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,