diff mbox series

[iwl-net] idpf: synchronize pending IRQs after disable

Message ID 20250116134257.93643-1-ahmed.zaki@intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [iwl-net] idpf: synchronize pending IRQs after disable | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 3 blamed authors not CCed: alan.brady@intel.com joshua.a.hay@intel.com willemb@google.com; 9 maintainers not CCed: alan.brady@intel.com edumazet@google.com joshua.a.hay@intel.com andrew+netdev@lunn.ch pabeni@redhat.com kuba@kernel.org przemyslaw.kitszel@intel.com willemb@google.com anthony.l.nguyen@intel.com
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 17 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 50 this patch: 50
netdev/source_inline success Was 0 now: 0

Commit Message

Ahmed Zaki Jan. 16, 2025, 1:42 p.m. UTC
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")
Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
Suggested-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Simon Horman Jan. 16, 2025, 6:29 p.m. UTC | #1
On Thu, Jan 16, 2025 at 06:42:57AM -0700, Ahmed Zaki wrote:
> 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")
> Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
> Suggested-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>
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 9be6a6b59c4e..8006bd9a95f6 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -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);
+	}
 }
 
 /**