linux/drivers/net/can
Ondrej Ille ca99392876 can: ctucanfd: fix SSP_SRC in cases when bit-rate is higher than 1 MBit.
commit e707c591a1 upstream.

The Secondary Sample Point Source field has been
set to an incorrect value by some mistake in the
past

  0b01 - SSP_SRC_NO_SSP - SSP is not used.

for data bitrates above 1 MBit/s. The correct/default
value already used for lower bitrates is

  0b00 - SSP_SRC_MEAS_N_OFFSET - SSP position = TRV_DELAY
         (Measured Transmitter delay) + SSP_OFFSET.

The related configuration register structure is described
in section 3.1.46 SSP_CFG of the CTU CAN FD
IP CORE Datasheet.

The analysis leading to the proper configuration
is described in section 2.8.3 Secondary sampling point
of the datasheet.

The change has been tested on AMD/Xilinx Zynq
with the next CTU CN FD IP core versions:

 - 2.6 aka master in the "integration with Zynq-7000 system" test
   6.12.43-rt12+ #1 SMP PREEMPT_RT kernel with CTU CAN FD git
   driver (change already included in the driver repo)
 - older 2.5 snapshot with mainline kernels with this patch
   applied locally in the multiple CAN latency tester nightly runs
   6.18.0-rc4-rt3-dut #1 SMP PREEMPT_RT
   6.19.0-rc3-dut

The logs, the datasheet and sources are available at

 https://canbus.pages.fel.cvut.cz/

Signed-off-by: Ondrej Ille <ondrej.ille@gmail.com>
Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>
Link: https://patch.msgid.link/20260105111620.16580-1-pisa@fel.cvut.cz
Fixes: 2dcb8e8782 ("can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.")
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-23 11:18:43 +01:00
..
c_can can: c_can: Use of_property_present() to test existence of DT property 2025-05-29 11:02:45 +02:00
cc770 can: {cc770,sja1000}_isa: allow building on x86_64 2024-11-04 17:46:06 +01:00
ctucanfd can: ctucanfd: fix SSP_SRC in cases when bit-rate is higher than 1 MBit. 2026-01-23 11:18:43 +01:00
dev can: netlink: can_changelink(): allow disabling of automatic restart 2025-10-29 14:08:56 +01:00
esd can: esd: acc_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-29 14:08:54 +01:00
flexcan can: flexcan: add NXP S32G2/S32G3 SoC support 2025-04-20 10:15:18 +02:00
ifi_canfd can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics 2024-12-14 20:03:01 +01:00
m_can can: m_can: fix CAN state in system PM 2025-10-23 16:20:28 +02:00
mscan can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
peak_canfd can: peak_canfd: Remove setting of RX software timestamp 2024-09-03 15:17:47 -07:00
rcar can: rcar_canfd: Fix CAN-FD mode as default 2025-12-07 06:25:02 +09:00
rockchip can: rockchip-canfd: rkcanfd_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-29 14:08:54 +01:00
sja1000 can: sja1000: fix max irq loop handling 2025-12-07 06:24:59 +09:00
slcan can: slcan: allow reception of short error messages 2025-05-29 11:03:19 +02:00
softing can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
spi can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled 2025-10-12 12:57:17 +02:00
usb can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak 2026-01-23 11:18:43 +01:00
at91_can.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
bxcan.c can: bxcan: bxcan_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-29 14:08:54 +01:00
can327.c tty: use u8 for flags 2023-08-11 21:12:45 +02:00
grcan.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
janz-ican3.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
Kconfig can: rockchip_canfd: add driver for Rockchip CAN-FD controller 2024-09-04 14:41:51 +02:00
kvaser_pciefd.c can: kvaser_pciefd: Store device channel index 2025-08-15 12:13:47 +02:00
Makefile can: rockchip_canfd: add driver for Rockchip CAN-FD controller 2024-09-04 14:41:51 +02:00
sun4i_can.c can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling 2025-12-07 06:24:59 +09:00
ti_hecc.c Revert "can: ti_hecc: fix -Woverflow compiler warning" 2025-08-28 16:31:05 +02:00
vcan.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
vxcan.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
xilinx_can.c can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB 2025-09-19 16:35:49 +02:00