diff options
author | Amir Vadai <amirv@mellanox.com> | 2013-04-25 01:22:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-26 23:29:13 -0400 |
commit | dc8142ea8906ea94a68734c1513b92b3f490fcd5 (patch) | |
tree | 28cb846c729e1d2eef2f1248183aa96d8d9003cf /drivers/net/ethernet/mellanox | |
parent | 30b40c31c2eeaa9188b09c3fd1230b90b2d1823b (diff) |
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: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index f4f88b846020..05c7c13bdbde 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -1373,7 +1373,8 @@ static void mlx4_en_service_task(struct work_struct *work) | |||
1373 | 1373 | ||
1374 | mutex_lock(&mdev->state_lock); | 1374 | mutex_lock(&mdev->state_lock); |
1375 | if (mdev->device_up) { | 1375 | if (mdev->device_up) { |
1376 | mlx4_en_ptp_overflow_check(mdev); | 1376 | if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) |
1377 | mlx4_en_ptp_overflow_check(mdev); | ||
1377 | 1378 | ||
1378 | queue_delayed_work(mdev->workqueue, &priv->service_task, | 1379 | queue_delayed_work(mdev->workqueue, &priv->service_task, |
1379 | SERVICE_TASK_DELAY); | 1380 | SERVICE_TASK_DELAY); |
@@ -2228,8 +2229,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
2228 | } | 2229 | } |
2229 | mlx4_en_set_default_moderation(priv); | 2230 | mlx4_en_set_default_moderation(priv); |
2230 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); | 2231 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); |
2231 | queue_delayed_work(mdev->workqueue, &priv->service_task, | 2232 | |
2232 | SERVICE_TASK_DELAY); | 2233 | if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) |
2234 | queue_delayed_work(mdev->workqueue, &priv->service_task, | ||
2235 | SERVICE_TASK_DELAY); | ||
2236 | |||
2233 | return 0; | 2237 | return 0; |
2234 | 2238 | ||
2235 | out: | 2239 | out: |