Skip to contentSkip to conversation

idpf: synchronize pending IRQs after disable

PATCH In review Ahmed Zaki 3 participants 3 messages Jan 16, 2025 – Feb 12, 2025

Subsystems (3)
lore
Share & tools
lore

Ahmed Zaki

author
#0 lore raw

PATCH 1/1 idpf: synchronize pending IRQs after disable

Wait for pending IRQ handler after it is disabled. This will ensure the IRQ is cleanly freed afterwards.

Fixes d4d558718266 ("idpf: initialize interrupts and enable vport")
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/idpf/idpf_txrx.c +7 -2
index 9be6a6b59c4e..8006bd9a95f6 100644
@@ -3592,10 +3592,15 @@ static void idpf_vport_intr_rel_irq(struct idpf_vport *vport)
 static void idpf_vport_intr_dis_irq_all(struct idpf_vport *vport)
 {
 	struct idpf_q_vector *q_vector = vport->q_vectors;
-	int q_idx;
+	int q_idx, vidx, irq_num;
+
+	for (q_idx = 0; q_idx < vport->num_q_vectors; q_idx++) {
+		vidx = vport->q_vector_idxs[q_idx];
+		irq_num = vport->adapter->msix_entries[vidx].vector;
 
-	for (q_idx = 0; q_idx < vport->num_q_vectors; q_idx++)
 		writel(0, q_vector[q_idx].intr_reg.dyn_ctl);
+		synchronize_irq(irq_num);
+	}
 }
 
 /**
Signature · 1 line
2.43.0
Tested-by
#2 lore raw
Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Simon Horman
Sent: Thursday, January 16, 2025 10:30 AM
To: Zaki, Ahmed <[email protected]>
Cc: [email protected]; [email protected]; Chittim, Madhu <[email protected]>; Sudheer Mogilappagari <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net] idpf: synchronize pending IRQs after disable

Quoted 3 lines · Ahmed Zaki

Wait for pending IRQ handler after it is disabled. This will ensure the IRQ is cleanly freed afterwards.

Quoted 6 lines
Quoted 4 lines
Fixes d4d558718266 ("idpf: initialize interrupts and enable vport")