]> git.baikalelectronics.ru Git - kernel.git/commit
can: m_can: m_can_{read_fifo,echo_tx_event}(): shift timestamp to full 32 bits
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 30 May 2022 17:30:28 +0000 (19:30 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Jul 2022 09:43:00 +0000 (11:43 +0200)
commitfbe737e9738411e269f07af3d0aec3868f577eef
treea8aeec6e30e5acc5f9e51845cb739300fca37ce9
parent8b1e8e3ef2cab26eb0d493e4a241ad5c8ed7a10a
can: m_can: m_can_{read_fifo,echo_tx_event}(): shift timestamp to full 32 bits

In commit 3a2fe20f9a76 ("can: m_can: fix periph RX path: use
rx-offload to ensure skbs are sent from softirq context") the RX path
for peripheral devices was switched to RX-offload.

Received CAN frames are pushed to RX-offload together with a
timestamp. RX-offload is designed to handle overflows of the timestamp
correctly, if 32 bit timestamps are provided.

The timestamps of m_can core are only 16 bits wide. So this patch
shifts them to full 32 bit before passing them to RX-offload.

Link: https://lore.kernel.org/all/20220612211410.4081390-1-mkl@pengutronix.de
Fixes: 3a2fe20f9a76 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context")
Cc: <stable@vger.kernel.org> # 5.13
Cc: Torin Cooper-Bennun <torin@maxiluxsystems.com>
Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c