New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: can: rcar: inconsistent behavior when calling can_stop() with pending transmissions #50546
Comments
@aaillet Ping |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Sorry for this big delay... I just verified #Board not plugged to CAN bus
uart:~$ can start can@e6c30000
starting can@e6c30000
uart:~$ can send can@e6c30000 01 DE AD BE EF
enqueuing CAN frame #0 with standard (11-bit) CAN ID 0x001, RTR 0, CAN-FD 0, BRS 0, DLC 4
uart:~$ can stop can@e6c30000
stopping can@e6c30000
#Pluging board to CAN bus
uart:~$ can start can@e6c30000
starting can@e6c30000
CAN frame #0 successfully sent I can confirm that the frame has successfully been received by the other CAN device (a computer using CAN USB adapter) as soon as Thank you in advance ! |
Unfortunately, that is the opposite of the desired behaviour. Calling |
Oh ok, so we want the controller to empty FIFOs and clear everything that has to be cleared ! |
Calling for can_stop() method was not emptying FIFOs and tx_msgq. We use controller reset mode to empty controller FIFOs. We are emptying tx_msgq with "ENETDOWN" return code. Fixes zephyrproject-rtos#50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Calling for can_stop() method was not emptying FIFOs and tx_msgq. Resetting TX FIFO to empty it. Emptying tx_msgq with "ENETDOWN" return code. Fixes zephyrproject-rtos#50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Calling for can_stop() method was not emptying FIFOs and tx_msgq. Resetting TX FIFO to empty it. Emptying tx_msgq with "ENETDOWN" return code. Fixes zephyrproject-rtos#50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Calling for can_stop() method was not emptying FIFOs and tx_msgq. Resetting TX FIFO to empty it. Emptying tx_msgq with "ENETDOWN" return code. Fixes zephyrproject-rtos#50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Calling for can_stop() method was not emptying FIFOs and tx_msgq. Resetting TX FIFO to empty it. Emptying tx_msgq with "ENETDOWN" return code. Fixes zephyrproject-rtos#50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Calling for can_stop() method was not emptying FIFOs and tx_msgq. Resetting TX FIFO to empty it. Emptying tx_msgq with "ENETDOWN" return code. Fixes #50546 Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Describe the bug
The Renesas R-Car CAN controller drivers likely exhibits inconsistent behavior when calling
can_stop()
with pending CAN frame transmissions similar as to what was reported in #50545. I have not been able to find the behavior of the Renesas R-Car CAN driver as I do not have access to the hardware.To check
Steps to reproduce the behavior:
can start <device>
.can send <device> 010
.can stop <device>
.candump
on GNU/Linux).can start <device>
.Expected behavior
The behavior should be the same across the Zephyr CAN drivers. Since some CAN controllers automatically abort any pending transmissions, the common behavior should be to abort any pending transmissions and notify the senders of this.
Impact
Unknown.
Environment (please complete the following information):
Additional context
The
can_stop()
API was introduced in #50102.The text was updated successfully, but these errors were encountered: