This is a note to let you know that I've just added the patch titled can: m_can: m_can_chip_config(): actually enable internal timestamping to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: can-m_can-m_can_chip_config-actually-enable-internal-timestamping.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5b12933de4e76ec164031c18ce8e0904abf530d7 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Date: Mon, 23 May 2022 17:18:33 +0200 Subject: can: m_can: m_can_chip_config(): actually enable internal timestamping From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> commit 5b12933de4e76ec164031c18ce8e0904abf530d7 upstream. In commit df06fd678260 ("can: m_can: m_can_chip_config(): enable and configure internal timestamps") the timestamping in the m_can core should be enabled. In peripheral mode, the RX'ed CAN frames, TX compete frames and error events are sorted by the timestamp. The above mentioned commit however forgot to enable the timestamping. Add the missing bits to enable the timestamp counter to the write of the Timestamp Counter Configuration register. Link: https://lore.kernel.org/all/20220612212708.4081756-1-mkl@xxxxxxxxxxxxxx Fixes: df06fd678260 ("can: m_can: m_can_chip_config(): enable and configure internal timestamps") Cc: <stable@xxxxxxxxxxxxxxx> # 5.13 Cc: Torin Cooper-Bennun <torin@xxxxxxxxxxxxxxxxxx> Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@xxxxxxxxxxx> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/can/m_can/m_can.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1360,7 +1360,9 @@ static void m_can_chip_config(struct net /* enable internal timestamp generation, with a prescalar of 16. The * prescalar is applied to the nominal bit timing */ - m_can_write(cdev, M_CAN_TSCC, FIELD_PREP(TSCC_TCP_MASK, 0xf)); + m_can_write(cdev, M_CAN_TSCC, + FIELD_PREP(TSCC_TCP_MASK, 0xf) | + FIELD_PREP(TSCC_TSS_MASK, TSCC_TSS_INTERNAL)); m_can_config_endisable(cdev, false); Patches currently in stable-queue which might be from mkl@xxxxxxxxxxxxxx are queue-5.18/can-gs_usb-gs_usb_open-close-fix-memory-leak.patch queue-5.18/can-kvaser_usb-replace-run-time-checks-with-struct-kvaser_usb_driver_info.patch queue-5.18/can-mcp251xfd-mcp251xfd_regmap_crc_read-update-workaround-broken-crc-on-tbc-register.patch queue-5.18/can-kvaser_usb-kvaser_usb_leaf-fix-can-clock-frequency-regression.patch queue-5.18/can-kvaser_usb-kvaser_usb_leaf-fix-bittiming-limits.patch queue-5.18/can-mcp251xfd-mcp251xfd_stop-add-missing-hrtimer_cancel.patch queue-5.18/can-grcan-grcan_probe-remove-extra-of_node_get.patch queue-5.18/can-m_can-m_can_chip_config-actually-enable-internal-timestamping.patch queue-5.18/can-mcp251xfd-mcp251xfd_regmap_crc_read-improve-workaround-handling-for-mcp2517fd.patch queue-5.18/can-bcm-use-call_rcu-instead-of-costly-synchronize_rcu.patch queue-5.18/can-m_can-m_can_-read_fifo-echo_tx_event-shift-timestamp-to-full-32-bits.patch