* Fw: [Bug 220168] New: flexcan-core.c
@ 2025-05-28 21:48 Stephen Hemminger
2025-05-29 0:49 ` Vincent Mailhol
2025-05-29 0:54 ` Vincent Mailhol
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-05-28 21:48 UTC (permalink / raw)
To: Oliver Hartkopp, Marc Kleine-Budde; +Cc: linux-can
Begin forwarded message:
Date: Wed, 28 May 2025 15:19:21 +0000
From: bugzilla-daemon@kernel.org
To: stephen@networkplumber.org
Subject: [Bug 220168] New: flexcan-core.c
https://bugzilla.kernel.org/show_bug.cgi?id=220168
Bug ID: 220168
Summary: flexcan-core.c
Product: Networking
Version: 2.5
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Other
Assignee: stephen@networkplumber.org
Reporter: robbinvandamme@gmail.com
Regression: No
Bit15 (TDCEN) should not be enabled according to the spec if dbrp > 2 and in
the driver it gets enabled when i set dbrp = 10. Resulting in RX Error Frames.
spec:
ISO11898-1:2015(E), section 11.3.3 (Transmtiter delay compensation) (page 52):
It shall be programmable whether the mechanism is used at all. When this
mechanism is used, the value of the prescaler for the data time quantum m(D)
shall be one or two.
The "prescaler for the data time quantim m(D)" is commonly referred to as
"dbrp" by implementations.
Kind regards,
Robbin
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Fw: [Bug 220168] New: flexcan-core.c
2025-05-28 21:48 Fw: [Bug 220168] New: flexcan-core.c Stephen Hemminger
@ 2025-05-29 0:49 ` Vincent Mailhol
2025-05-29 0:54 ` Vincent Mailhol
1 sibling, 0 replies; 3+ messages in thread
From: Vincent Mailhol @ 2025-05-29 0:49 UTC (permalink / raw)
To: Stephen Hemminger, robbinvandamme; +Cc: Oliver, Marc Kleine-Budde, linux-can
+To: Robbin
Hi Stephen and Robbin,
Thanks for forwarding us this bug report.
On Thu. 29 May 2025 à 06:48, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> Begin forwarded message:
>
> Date: Wed, 28 May 2025 15:19:21 +0000
> From: bugzilla-daemon@kernel.org
> To: stephen@networkplumber.org
> Subject: [Bug 220168] New: flexcan-core.c
>
>
> https://bugzilla.kernel.org/show_bug.cgi?id=220168
>
> Bug ID: 220168
> Summary: flexcan-core.c
> Product: Networking
> Version: 2.5
> Hardware: All
> OS: Linux
> Status: NEW
> Severity: normal
> Priority: P3
> Component: Other
> Assignee: stephen@networkplumber.org
> Reporter: robbinvandamme@gmail.com
> Regression: No
>
> Bit15 (TDCEN) should not be enabled according to the spec if dbrp > 2 and in
> the driver it gets enabled when i set dbrp = 10. Resulting in RX Error Frames.
>
>
> spec:
> ISO11898-1:2015(E), section 11.3.3 (Transmtiter delay compensation) (page 52):
> It shall be programmable whether the mechanism is used at all. When this
> mechanism is used, the value of the prescaler for the data time quantum m(D)
> shall be one or two.
>
> The "prescaler for the data time quantim m(D)" is commonly referred to as
> "dbrp" by implementations.
The issue which you describe here as well as the issue in bug 220170
[1] share roughly the same root cause: the driver is setting the TDC
parameters manually without doing any proper checking. The reason is
that, at the time of writing, the CAN subsystem did not have a
framework to handle the TDC logic. This has changed since.
We had a very similar issue on the mcp251xfd driver recently which was
fixed in [2]. Other relevant background information can be found in
[3]. The flexcan needs to be modified in a similar fashion.
I do not have the hardware so it would be hard to fix on my side.
@Robbin: I assume you have access to the hardware. Would you like to
try to write the patch for this? I can provide guidance.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=220170
[2] commit 5e1663810e11 ("can: mcp251xfd: fix TDC setting for low data
bit rates")
Link: https://git.kernel.org/torvalds/c/5e1663810e11
[3] Re: mcp251xfd: forced TDC
Link: https://lore.kernel.org/all/CAMZ6RqKdyFPRwMbCZY5HwzLTeT9jcbxFiOfcuHbo+VgFF3ZViw@mail.gmail.com/
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Fw: [Bug 220168] New: flexcan-core.c
2025-05-28 21:48 Fw: [Bug 220168] New: flexcan-core.c Stephen Hemminger
2025-05-29 0:49 ` Vincent Mailhol
@ 2025-05-29 0:54 ` Vincent Mailhol
1 sibling, 0 replies; 3+ messages in thread
From: Vincent Mailhol @ 2025-05-29 0:54 UTC (permalink / raw)
To: Stephen Hemminger, robbinvandamme
Cc: linux-can, Marc Kleine-Budde, Oliver Hartkopp
+To: Robbin
Hi Stephen and Robbin,
Thanks for forwarding us this bug report.
On 29/05/2025 at 06:48, Stephen Hemminger wrote:
> Begin forwarded message:
>
> Date: Wed, 28 May 2025 15:19:21 +0000
> From: bugzilla-daemon@kernel.org
> To: stephen@networkplumber.org
> Subject: [Bug 220168] New: flexcan-core.c
>
>
> https://bugzilla.kernel.org/show_bug.cgi?id=220168
>
> Bug ID: 220168
> Summary: flexcan-core.c
> Product: Networking
> Version: 2.5
> Hardware: All
> OS: Linux
> Status: NEW
> Severity: normal
> Priority: P3
> Component: Other
> Assignee: stephen@networkplumber.org
> Reporter: robbinvandamme@gmail.com
> Regression: No
>
> Bit15 (TDCEN) should not be enabled according to the spec if dbrp > 2 and in
> the driver it gets enabled when i set dbrp = 10. Resulting in RX Error Frames.
>
>
> spec:
> ISO11898-1:2015(E), section 11.3.3 (Transmtiter delay compensation) (page 52):
> It shall be programmable whether the mechanism is used at all. When this
> mechanism is used, the value of the prescaler for the data time quantum m(D)
> shall be one or two.
>
> The "prescaler for the data time quantim m(D)" is commonly referred to as
> "dbrp" by implementations.
The issue which you describe here as well as the issue in bug 220170
[1] share roughly the same root cause: the driver is setting the TDC
parameters manually without doing any proper checking. The reason is
that, at the time of writing, the CAN subsystem did not have a
framework to handle the TDC logic. This has changed since.
We had a very similar issue on the mcp251xfd driver recently which was
fixed in [2]. Other relevant background information can be found in
[3]. The flexcan needs to be modified in a similar fashion.
I do not have the hardware so it would be hard to fix on my side.
@Robbin: I assume you have access to the hardware. Would you like to
try to write the patch for this? I can provide guidance.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=220170
[2] commit 5e1663810e11 ("can: mcp251xfd: fix TDC setting for low data
bit rates")
Link: https://git.kernel.org/torvalds/c/5e1663810e11
[3] Re: mcp251xfd: forced TDC
Link:
https://lore.kernel.org/all/CAMZ6RqKdyFPRwMbCZY5HwzLTeT9jcbxFiOfcuHbo+VgFF3ZViw@mail.gmail.com/
Yours sincerely,
Vincent Mailhol
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-29 0:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 21:48 Fw: [Bug 220168] New: flexcan-core.c Stephen Hemminger
2025-05-29 0:49 ` Vincent Mailhol
2025-05-29 0:54 ` Vincent Mailhol
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox