diff mbox series

[iwl-net,2/2] idpf: finish pending IRQ handling before freeing interrupt

Message ID 20241109001206.213581-3-ahmed.zaki@intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series idpf: Preserve IRQ affinity and sync IRQ | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/apply fail Patch does not apply to net-0

Commit Message

Ahmed Zaki Nov. 9, 2024, 12:12 a.m. UTC
From: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>

Wait for pending IRQs to be handled before an interrupt is free'd up.

Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport")
Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Nov. 12, 2024, 2:54 a.m. UTC | #1
On Fri,  8 Nov 2024 17:12:06 -0700 Ahmed Zaki wrote:
> From: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
> 
> Wait for pending IRQs to be handled before an interrupt is free'd up.

read the kdoc on free_irq(), please
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index 82e0e3698f10..08acdd383b8d 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -3584,6 +3584,7 @@  static void idpf_vport_intr_rel_irq(struct idpf_vport *vport)
 
 		/* clear the affinity_mask in the IRQ descriptor */
 		irq_set_affinity_notifier(irq_num, NULL);
+		synchronize_irq(irq_num);
 		kfree(free_irq(irq_num, q_vector));
 	}
 }