net/mlx5e: Fix wrong delay calculation for overflow check scheduling
authorEugenia Emantayev <eugenia@mellanox.com>
Wed, 12 Jul 2017 14:27:18 +0000 (17:27 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 27 Jul 2017 13:40:17 +0000 (16:40 +0300)
The overflow_period is calculated in seconds. In order to use it
for delayed work scheduling translation to jiffies is needed.

Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_clock.c

index ba355c6b6e1fb49e1a8c313a678ca7859e73c359..cde8e8e772ec9ffdc1e836483f7320105615899b 100644 (file)
@@ -119,7 +119,8 @@ static void mlx5e_timestamp_overflow(struct work_struct *work)
        write_lock_irqsave(&tstamp->lock, flags);
        timecounter_read(&tstamp->clock);
        write_unlock_irqrestore(&tstamp->lock, flags);
-       schedule_delayed_work(&tstamp->overflow_work, tstamp->overflow_period);
+       schedule_delayed_work(&tstamp->overflow_work,
+                             msecs_to_jiffies(tstamp->overflow_period * 1000));
 }
 
 int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)