net/mlx5: Read timeout values from init segment
authorAmir Tzin <amirtz@mellanox.com>
Thu, 7 Oct 2021 15:00:27 +0000 (18:00 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 16 Oct 2021 00:37:43 +0000 (17:37 -0700)
commit5945e1adeab527ec96c75a786213c146d4d482a4
treed1b06359af6a806aa568eb528d334b949ac14fca
parent4b2c5fa9c9902ce34ecea6711558d9af96351b31
net/mlx5: Read timeout values from init segment

Replace hard coded timeouts with values stored in firmware's init
segment. Timeouts are read from init segment during driver load. If init
segment timeouts are not supported then fallback to hard coded defaults
instead. Also move pre initialization timeouts which cannot be read from
firmware to the new mechanism.

Signed-off-by: Amir Tzin <amirtz@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/lib/tout.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/lib/tout.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h