mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Add support for disabling and polling MSIX interrupts in mlx5core.
MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
f98977b521
commit
f14d849862
3 changed files with 30 additions and 2 deletions
|
|
@ -1180,4 +1180,7 @@ static inline bool mlx5_rl_is_supported(struct mlx5_core_dev *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
void mlx5_disable_interrupts(struct mlx5_core_dev *);
|
||||
void mlx5_poll_interrupts(struct mlx5_core_dev *);
|
||||
|
||||
#endif /* MLX5_DRIVER_H */
|
||||
|
|
|
|||
|
|
@ -739,3 +739,28 @@ static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
mlx5_disable_interrupts(struct mlx5_core_dev *dev)
|
||||
{
|
||||
int nvec = dev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE;
|
||||
int x;
|
||||
|
||||
for (x = 0; x != nvec; x++)
|
||||
disable_irq(dev->priv.msix_arr[x].vector);
|
||||
}
|
||||
|
||||
void
|
||||
mlx5_poll_interrupts(struct mlx5_core_dev *dev)
|
||||
{
|
||||
struct mlx5_eq *eq;
|
||||
|
||||
if (unlikely(dev->priv.disable_irqs != 0))
|
||||
return;
|
||||
|
||||
mlx5_eq_int(dev, &dev->priv.eq_table.cmd_eq);
|
||||
mlx5_eq_int(dev, &dev->priv.eq_table.async_eq);
|
||||
mlx5_eq_int(dev, &dev->priv.eq_table.pages_eq);
|
||||
|
||||
list_for_each_entry(eq, &dev->priv.eq_table.comp_eqs_list, list)
|
||||
mlx5_eq_int(dev, eq);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1585,7 +1585,7 @@ done:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mlx5_disable_interrupts(struct mlx5_core_dev *mdev)
|
||||
static void mlx5_shutdown_disable_interrupts(struct mlx5_core_dev *mdev)
|
||||
{
|
||||
int nvec = mdev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE;
|
||||
int x;
|
||||
|
|
@ -1609,7 +1609,7 @@ static void shutdown_one(struct pci_dev *pdev)
|
|||
set_bit(MLX5_INTERFACE_STATE_TEARDOWN, &dev->intf_state);
|
||||
|
||||
/* disable all interrupts */
|
||||
mlx5_disable_interrupts(dev);
|
||||
mlx5_shutdown_disable_interrupts(dev);
|
||||
|
||||
err = mlx5_try_fast_unload(dev);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue