aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/eq.h
diff options
context:
space:
mode:
authorYuval Avnery <yuvalav@mellanox.com>2019-06-10 23:38:42 +0000
committerSaeed Mahameed <saeedm@mellanox.com>2019-06-13 10:59:49 -0700
commit1f8a7bee27e63d7c5287719049941e285e54d370 (patch)
tree5f838bebd4ff22696c5d32855e1490461c4e35ee /include/linux/mlx5/eq.h
parentnet/mlx5: Use a single IRQ for all async EQs (diff)
downloadlinux-dev-1f8a7bee27e63d7c5287719049941e285e54d370.tar.xz
linux-dev-1f8a7bee27e63d7c5287719049941e285e54d370.zip
net/mlx5: Add EQ enable/disable API
Previously, EQ joined the chain notifier on creation. This forced the caller to be ready to handle events before creating the EQ through eq_create_generic interface. To help the caller control when the created EQ will be attached to the IRQ, add enable/disable API. Signed-off-by: Yuval Avnery <yuvalav@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r--include/linux/mlx5/eq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mlx5/eq.h b/include/linux/mlx5/eq.h
index 4a94e04eff0a..70e16dcfb4c4 100644
--- a/include/linux/mlx5/eq.h
+++ b/include/linux/mlx5/eq.h
@@ -16,13 +16,16 @@ struct mlx5_eq_param {
u8 irq_index;
int nent;
u64 mask;
- struct notifier_block *nb;
};
struct mlx5_eq *
mlx5_eq_create_generic(struct mlx5_core_dev *dev, struct mlx5_eq_param *param);
int
mlx5_eq_destroy_generic(struct mlx5_core_dev *dev, struct mlx5_eq *eq);
+int mlx5_eq_enable(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
+ struct notifier_block *nb);
+void mlx5_eq_disable(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
+ struct notifier_block *nb);
struct mlx5_eqe *mlx5_eq_get_eqe(struct mlx5_eq *eq, u32 cc);
void mlx5_eq_update_ci(struct mlx5_eq *eq, u32 cc, bool arm);