Can bus-off restart The communication fails

The platform we use is AGX ORIN 32G jetpack 5.1.1
A problem was found when using mttcan’s analog bus-off. When we short-circuited can L and H and sent data using the can interface, we found that bus-off no longer increased.
The interface configuration parameters are:
sudo ip link set can0 type can bitrate 1000000 restart-ms 1000 sjw 4 berr-reporting on
sudo ifconfig can0 up txqueuelen 65536

Test 1: Short-circuit the H and L of can and run the “cangen can0 -g 1 -L 8-n 10 -v” command to test. The test result indicates that the bus-off state is switched to error active. The number of bus-offs with this name increases with each run. And can connect with another can, can normally send and receive communication.

Test 2: H and L shorting of can, executing “cangen can0 -g 1 -L 8 -n 40 -v” We found that no matter how many times the command was executed, the bus-off count did not increase and the bus-off count remained unchanged at 1. And connect can to another can, which can only receive data but not send data.


In actual use, the application layer may still send a large amount of data when the bus-off state changes to error active. There is a real need, so I want to help solve this problem

Hi 983938706,

Are you using the devkit or custom board for AGX Orin?

Is setup for Test1 and Test 2 the same(both shorting CAN-H/CAN-L)?
just different from -n parameter for cangen?

It seems you use 1000ms for restart-ms, do you recover the connection within 1000ms after it enters into bus-off state?

kernel/nvidia/drivers/net/can/mttcan/native/m_ttcan_linux.c

The same problem exists on the development board of AGX Orin. I looked at the mttcan code and it stops the can dev queue if there is a cache overflow during sending. After I commented out this line of code, the tests were fine. I would like to confirm why we stopped the can dev queue and whether there are any other problems

Do you mean that commenting out Line 1380 in mttcan driver could fix the issue about failing to recover from Bus-Off state?

I mean that commenting 1380 lines of code can solve this problem, and I want you to check if there are any other problems with this change

We are working on fixing CAN related issue about it cannot be recovered from bus-off state.

If the current WAR works in your case, you can just apply it.
Or you can wait for the next Jetpack release for our official fix.