This is a note to let you know that I've just added the patch titled can: m_can: m_can_{read_fifo,echo_tx_event}(): shift timestamp to full 32 bits 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_-read_fifo-echo_tx_event-shift-timestamp-to-full-32-bits.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 4c3333693f07313f5f0145a922f14a7d3c0f4f21 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Date: Mon, 30 May 2022 19:30:28 +0200 Subject: can: m_can: m_can_{read_fifo,echo_tx_event}(): shift timestamp to full 32 bits From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> commit 4c3333693f07313f5f0145a922f14a7d3c0f4f21 upstream. In commit 1be37d3b0414 ("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@xxxxxxxxxxxxxx Fixes: 1be37d3b0414 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context") 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, 2 insertions(+), 2 deletions(-) --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -532,7 +532,7 @@ static int m_can_read_fifo(struct net_de /* acknowledge rx fifo 0 */ m_can_write(cdev, M_CAN_RXF0A, fgi); - timestamp = FIELD_GET(RX_BUF_RXTS_MASK, fifo_header.dlc); + timestamp = FIELD_GET(RX_BUF_RXTS_MASK, fifo_header.dlc) << 16; m_can_receive_skb(cdev, skb, timestamp); @@ -1036,7 +1036,7 @@ static int m_can_echo_tx_event(struct ne } msg_mark = FIELD_GET(TX_EVENT_MM_MASK, txe); - timestamp = FIELD_GET(TX_EVENT_TXTS_MASK, txe); + timestamp = FIELD_GET(TX_EVENT_TXTS_MASK, txe) << 16; /* ack txe element */ m_can_write(cdev, M_CAN_TXEFA, FIELD_PREP(TXEFA_EFAI_MASK, 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