linux-brain/drivers/net/can/usb/peak_usb
Stephane Grosjean a23ee99566 can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
[ Upstream commit ecc7b4187dd388549544195fb13a11b4ea8e6a84 ]

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: Fabian Inostroza <fabianinostrozap@gmail.com>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Link: https://lore.kernel.org/r/20201014085631.15128-1-s.grosjean@peak-system.com
Fixes: bb4785551f ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-18 19:20:20 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pcan_usb_core.c can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping 2020-11-18 19:20:20 +01:00
pcan_usb_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
pcan_usb_fd.c can: peak_usb: add range checking in decode operations 2020-11-18 19:20:19 +01:00
pcan_usb_pro.c can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices 2019-08-02 13:58:01 +02:00
pcan_usb_pro.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
pcan_usb.c can: peak_usb: report bus recovery as well 2019-11-04 21:47:20 +01:00