Commit 6f8551f8 authored by Moshe Shemesh's avatar Moshe Shemesh Committed by Saeed Mahameed
Browse files

net/mlx5: Check DTOR entry value is not zero



The Default Timeout Register (DTOR) provides timeout values to driver
for flows that are device dependent. Zero value for DTOR entry is not
valid and should not be used. In case of reading zero value from DTOR,
the driver should use the hard coded SW default value instead.

Signed-off-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 8bb42ed4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ u64 _mlx5_tout_ms(struct mlx5_core_dev *dev, enum mlx5_timeouts_types type)
#define MLX5_TIMEOUT_FILL(fld, reg_out, dev, to_type, to_extra) \
	({ \
	u64 fw_to = MLX5_TIMEOUT_QUERY(fld, reg_out); \
	if (fw_to) \
		tout_set(dev, fw_to + (to_extra), to_type); \
	fw_to; \
	})