Skip to content
Commit ecc7b418 authored by Stephane Grosjean's avatar Stephane Grosjean Committed by Marc Kleine-Budde
Browse files

can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping



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>
parent a6921dd5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment