Commit dc8142ea authored by Amir Vadai's avatar Amir Vadai Committed by David S. Miller

net/mlx4_en: Disable HW clock overflow check when no HW support

Should not run HW clock overflow check if HW clock is not supported. Also, since
this watchdog is the only customer of service_task, no need to start it in that case.
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 30b40c31
......@@ -1373,6 +1373,7 @@ static void mlx4_en_service_task(struct work_struct *work)
mutex_lock(&mdev->state_lock);
if (mdev->device_up) {
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS)
mlx4_en_ptp_overflow_check(mdev);
queue_delayed_work(mdev->workqueue, &priv->service_task,
......@@ -2228,8 +2229,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
}
mlx4_en_set_default_moderation(priv);
queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS)
queue_delayed_work(mdev->workqueue, &priv->service_task,
SERVICE_TASK_DELAY);
return 0;
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment