IB/mlx5: Fix eq names to display nicely in /proc/interrupts
It's helpful for a driver to put the pci slot name in its interrupt names, so /proc/interrupts will show the pci slot of the device. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
9c8651314b
commit
ada9f5d007
@ -164,6 +164,7 @@ int mlx5_vector2eqn(struct mlx5_ib_dev *dev, int vector, int *eqn, int *irqn)
|
|||||||
static int alloc_comp_eqs(struct mlx5_ib_dev *dev)
|
static int alloc_comp_eqs(struct mlx5_ib_dev *dev)
|
||||||
{
|
{
|
||||||
struct mlx5_eq_table *table = &dev->mdev.priv.eq_table;
|
struct mlx5_eq_table *table = &dev->mdev.priv.eq_table;
|
||||||
|
char name[MLX5_MAX_EQ_NAME];
|
||||||
struct mlx5_eq *eq, *n;
|
struct mlx5_eq *eq, *n;
|
||||||
int ncomp_vec;
|
int ncomp_vec;
|
||||||
int nent;
|
int nent;
|
||||||
@ -180,11 +181,10 @@ static int alloc_comp_eqs(struct mlx5_ib_dev *dev)
|
|||||||
goto clean;
|
goto clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(eq->name, MLX5_MAX_EQ_NAME, "mlx5_comp%d", i);
|
snprintf(name, MLX5_MAX_EQ_NAME, "mlx5_comp%d", i);
|
||||||
err = mlx5_create_map_eq(&dev->mdev, eq,
|
err = mlx5_create_map_eq(&dev->mdev, eq,
|
||||||
i + MLX5_EQ_VEC_COMP_BASE, nent, 0,
|
i + MLX5_EQ_VEC_COMP_BASE, nent, 0,
|
||||||
eq->name,
|
name, &dev->mdev.priv.uuari.uars[0]);
|
||||||
&dev->mdev.priv.uuari.uars[0]);
|
|
||||||
if (err) {
|
if (err) {
|
||||||
kfree(eq);
|
kfree(eq);
|
||||||
goto clean;
|
goto clean;
|
||||||
|
@ -366,9 +366,11 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx,
|
|||||||
goto err_in;
|
goto err_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snprintf(eq->name, MLX5_MAX_EQ_NAME, "%s@pci:%s",
|
||||||
|
name, pci_name(dev->pdev));
|
||||||
eq->eqn = out.eq_number;
|
eq->eqn = out.eq_number;
|
||||||
err = request_irq(table->msix_arr[vecidx].vector, mlx5_msix_handler, 0,
|
err = request_irq(table->msix_arr[vecidx].vector, mlx5_msix_handler, 0,
|
||||||
name, eq);
|
eq->name, eq);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_eq;
|
goto err_eq;
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MLX5_MAX_EQ_NAME = 20
|
MLX5_MAX_EQ_NAME = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user