@@ -138,18 +138,23 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id,
138138 return ret ;
139139}
140140
141- static void irq_release (struct mlx5_irq * irq )
141+ static void mlx5_system_free_irq (struct mlx5_irq * irq )
142142{
143- struct mlx5_irq_pool * pool = irq -> pool ;
144-
145- xa_erase (& pool -> irqs , irq -> index );
146143 /* free_irq requires that affinity and rmap will be cleared
147144 * before calling it. This is why there is asymmetry with set_rmap
148145 * which should be called after alloc_irq but before request_irq.
149146 */
150147 irq_set_affinity_hint (irq -> irqn , NULL );
151- free_cpumask_var (irq -> mask );
152148 free_irq (irq -> irqn , & irq -> nh );
149+ }
150+
151+ static void irq_release (struct mlx5_irq * irq )
152+ {
153+ struct mlx5_irq_pool * pool = irq -> pool ;
154+
155+ xa_erase (& pool -> irqs , irq -> index );
156+ mlx5_system_free_irq (irq );
157+ free_cpumask_var (irq -> mask );
153158 kfree (irq );
154159}
155160
@@ -556,7 +561,7 @@ static void mlx5_irq_pool_free_irqs(struct mlx5_irq_pool *pool)
556561 unsigned long index ;
557562
558563 xa_for_each (& pool -> irqs , index , irq )
559- free_irq (irq -> irqn , & irq -> nh );
564+ mlx5_system_free_irq (irq );
560565}
561566
562567static void mlx5_irq_pools_free_irqs (struct mlx5_irq_table * table )
0 commit comments