aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2021-08-19 16:01:28 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-09-30 14:07:56 -0700
commitac8b7d50ae4c3f5325c599f3d6e939ecef6a585a (patch)
tree53913a8db8246de963f037d298777c67c7e76508 /drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
parentnet/mlx5: Avoid generating event after PPS out in Real time mode (diff)
downloadlinux-dev-ac8b7d50ae4c3f5325c599f3d6e939ecef6a585a.tar.xz
linux-dev-ac8b7d50ae4c3f5325c599f3d6e939ecef6a585a.zip
net/mlx5: Fix length of irq_index in chars
The maximum irq_index can be 2047, This means irq_name should have 4 characters reserve for the irq_index. Hence, increase it to 4. Fixes: 3af26495a247 ("net/mlx5: Enlarge interrupt field in CREATE_EQ") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index c79a10b3454d..df54f62a38ac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -13,8 +13,8 @@
#endif
#define MLX5_MAX_IRQ_NAME (32)
-/* max irq_index is 255. three chars */
-#define MLX5_MAX_IRQ_IDX_CHARS (3)
+/* max irq_index is 2047, so four chars */
+#define MLX5_MAX_IRQ_IDX_CHARS (4)
#define MLX5_SFS_PER_CTRL_IRQ 64
#define MLX5_IRQ_CTRL_SF_MAX 8