Commit 37cc5273 authored by Stephane Grosjean's avatar Stephane Grosjean Committed by Greg Kroah-Hartman
Browse files

can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping



[ Upstream commit ecc7b418 ]

Fabian Inostroza <fabianinostrozap@gmail.com> has discovered a potential
problem in the hardware timestamp reporting from the PCAN-USB USB CAN interface
(only), related to the fact that a timestamp of an event may precede the
timestamp used for synchronization when both records are part of the same USB
packet. However, this case was used to detect the wrapping of the time counter.

This patch details and fixes the two identified cases where this problem can
occur.

Reported-by: default avatarFabian Inostroza <fabianinostrozap@gmail.com>
Signed-off-by: default avatarStephane Grosjean <s.grosjean@peak-system.com>
Link: https://lore.kernel.org/r/20201014085631.15128-1-s.grosjean@peak-system.com


Fixes: bb478555 ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5013cdd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment