| 1 |
.. SPDX-License-Identifier: GPL-2.0+ |
| 2 |
|
| 3 |
============================= |
| 4 |
Flexcan CAN Controller driver |
| 5 |
============================= |
| 6 |
|
| 7 |
Authors: Marc Kleine-Budde <[email protected]>, |
| 8 |
Dario Binacchi <[email protected]> |
| 9 |
|
| 10 |
On/off RTR frames reception |
| 11 |
=========================== |
| 12 |
|
| 13 |
For most flexcan IP cores the driver supports 2 RX modes: |
| 14 |
|
| 15 |
- FIFO |
| 16 |
- mailbox |
| 17 |
|
| 18 |
The older flexcan cores (integrated into the i.MX25, i.MX28, i.MX35 |
| 19 |
and i.MX53 SOCs) only receive RTR frames if the controller is |
| 20 |
configured for RX-FIFO mode. |
| 21 |
|
| 22 |
The RX FIFO mode uses a hardware FIFO with a depth of 6 CAN frames, |
| 23 |
while the mailbox mode uses a software FIFO with a depth of up to 62 |
| 24 |
CAN frames. With the help of the bigger buffer, the mailbox mode |
| 25 |
performs better under high system load situations. |
| 26 |
|
| 27 |
As reception of RTR frames is part of the CAN standard, all flexcan |
| 28 |
cores come up in a mode where RTR reception is possible. |
| 29 |
|
| 30 |
With the "rx-rtr" private flag the ability to receive RTR frames can |
| 31 |
be waived at the expense of losing the ability to receive RTR |
| 32 |
messages. This trade off is beneficial in certain use cases. |
| 33 |
|
| 34 |
"rx-rtr" on |
| 35 |
Receive RTR frames. (default) |
| 36 |
|
| 37 |
The CAN controller can and will receive RTR frames. |
| 38 |
|
| 39 |
On some IP cores the controller cannot receive RTR frames in the |
| 40 |
more performant "RX mailbox" mode and will use "RX FIFO" mode |
| 41 |
instead. |
| 42 |
|
| 43 |
"rx-rtr" off |
| 44 |
|
| 45 |
Waive ability to receive RTR frames. (not supported on all IP cores) |
| 46 |
|
| 47 |
This mode activates the "RX mailbox mode" for better performance, on |
| 48 |
some IP cores RTR frames cannot be received anymore. |
| 49 |
|
| 50 |
The setting can only be changed if the interface is down:: |
| 51 |
|
| 52 |
ip link set dev can0 down |
| 53 |
ethtool --set-priv-flags can0 rx-rtr {off|on} |
| 54 |
ip link set dev can0 up |