Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 862ade9a authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by Greg Kroah-Hartman
Browse files

net/mlx5e: Fix wrong delay calculation for overflow check scheduling




[ Upstream commit d439c84509a510e864fdc6166c760482cd03fc57 ]

The overflow_period is calculated in seconds. In order to use it
for delayed work scheduling translation to jiffies is needed.

Fixes: ef9814de ('net/mlx5e: Add HW timestamping (TS) support')
Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d7049799
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -67,7 +67,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 net_device *dev, struct ifreq *ifr)