From: Amir Vadai Date: Thu, 25 Apr 2013 05:22:24 +0000 (+0000) Subject: net/mlx4_en: Disable HW clock overflow check when no HW support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc8142ea8906ea94a68734c1513b92b3f490fcd5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- 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) 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); @@ -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: