diff mbox series

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

Message ID 20241109001206.213581-3-ahmed.zaki@intel.com
State Changes Requested
Headers show
Series idpf: Preserve IRQ affinity and sync IRQ | expand

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
Ahmed Zaki Dec. 2, 2024, 1:11 p.m. UTC | #2
On 2024-11-11 7:54 p.m., Jakub Kicinski wrote:
> 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


IIUC, this patch applies synchronize_irq() after the IRQ is disabled. 
But I will move it there for clarity.

Thanks.
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));
 	}
 }