Go to file
Vincent Mailhol 33b83a90b6 can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min
[ Upstream commit 63dfe07096 ]

ISO 11898-1 specifies in section 11.3.3 "Transmitter delay
compensation" that "the configuration range for [the] SSP position
shall be at least 0 to 63 minimum time quanta."

Because SSP = TDCV + TDCO, it means that we should allow both TDCV and
TDCO to hold zero value in order to honor SSP's minimum possible
value.

However, current implementation assigned special meaning to TDCV and
TDCO's zero values:
  * TDCV = 0 -> TDCV is automatically measured by the transceiver.
  * TDCO = 0 -> TDC is off.

In order to allow for those values to really be zero and to maintain
current features, we introduce two new flags:
  * CAN_CTRLMODE_TDC_AUTO indicates that the controller support
    automatic measurement of TDCV.
  * CAN_CTRLMODE_TDC_MANUAL indicates that the controller support
    manual configuration of TDCV. N.B.: current implementation failed
    to provide an option for the driver to indicate that only manual
    mode was supported.

TDC is disabled if both CAN_CTRLMODE_TDC_AUTO and
CAN_CTRLMODE_TDC_MANUAL flags are off, c.f. the helper function
can_tdc_is_enabled() which is also introduced in this patch.

Also, this patch adds three fields: tdcv_min, tdco_min and tdcf_min to
struct can_tdc_const. While we are not convinced that those three
fields could be anything else than zero, we can imagine that some
controllers might specify a lower bound on these. Thus, those minimums
are really added "just in case".

Comments of struct can_tdc and can_tdc_const are updated accordingly.

Finally, the changes are applied to the etas_es58x driver.

Link: https://lore.kernel.org/all/20210918095637.20108-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Stable-dep-of: 38c0abad45b1 ("can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-02 13:39:11 +02:00
arch arm64: dts: imx8mp: Correct thermal sensor index 2025-10-02 13:39:10 +02:00
block block: avoid possible overflow for chunk_sectors check in blk_stack_limits() 2025-08-28 16:24:25 +02:00
certs
crypto crypto: xts - Only add ecb if it is not already there 2025-06-27 11:05:10 +01:00
Documentation dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks 2025-10-02 13:39:02 +02:00
drivers can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min 2025-10-02 13:39:11 +02:00
fs ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer 2025-10-02 13:39:09 +02:00
include can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min 2025-10-02 13:39:11 +02:00
init sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP 2025-05-02 07:44:36 +02:00
io_uring io_uring: fix possible deadlock in io_register_iowq_max_workers() 2024-11-17 15:06:25 +01:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-06-27 11:05:26 +01:00
kernel bpf: Reject bpf_timer for PREEMPT_RT 2025-10-02 13:39:11 +02:00
lib kunit: kasan_test: disable fortify string checker on kasan_strings() test 2025-10-02 13:38:59 +02:00
LICENSES
mm mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory 2025-10-02 13:39:05 +02:00
net net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer 2025-10-02 13:39:09 +02:00
samples samples: mei: Fix building on musl libc 2025-08-28 16:24:07 +02:00
scripts randstruct: gcc-plugin: Fix attribute addition 2025-09-09 18:50:23 +02:00
security securityfs: don't pin dentries twice, once is enough... 2025-08-28 16:24:17 +02:00
sound ALSA: usb-audio: Fix build with CONFIG_INPUT=n 2025-10-02 13:39:10 +02:00
tools perf bpf-event: Fix use-after-free in synthesis 2025-09-09 18:50:24 +02:00
usr kbuild: hdrcheck: fix cross build with clang 2025-06-27 11:05:22 +01:00
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-10-22 15:40:41 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-10-17 15:11:10 +02:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS trace: Relocate event helper files 2024-04-10 16:19:24 +02:00
Makefile Linux 5.15.193 2025-09-11 17:17:17 +02:00
README

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.