Skip to content

Commit

Permalink
net/mlx4_en: Disable HW clock overflow check when no HW support
Browse files Browse the repository at this point in the history
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: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amir Vadai authored and David S. Miller committed Apr 27, 2013
1 parent 30b40c3 commit dc8142e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,8 @@ static void mlx4_en_service_task(struct work_struct *work)

mutex_lock(&mdev->state_lock);
if (mdev->device_up) {
mlx4_en_ptp_overflow_check(mdev);
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS)
mlx4_en_ptp_overflow_check(mdev);

queue_delayed_work(mdev->workqueue, &priv->service_task,
SERVICE_TASK_DELAY);
Expand Down Expand Up @@ -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);
queue_delayed_work(mdev->workqueue, &priv->service_task,
SERVICE_TASK_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:
Expand Down

0 comments on commit dc8142e

Please sign in to comment.