0001 .. SPDX-License-Identifier: GPL-2.0+
0002
0003 =============================
0004 Flexcan CAN Controller driver
0005 =============================
0006
0007 Authors: Marc Kleine-Budde <mkl@pengutronix.de>,
0008 Dario Binacchi <dario.binacchi@amarula.solutions.com>
0009
0010 On/off RTR frames reception
0011 ===========================
0012
0013 For most flexcan IP cores the driver supports 2 RX modes:
0014
0015 - FIFO
0016 - mailbox
0017
0018 The older flexcan cores (integrated into the i.MX25, i.MX28, i.MX35
0019 and i.MX53 SOCs) only receive RTR frames if the controller is
0020 configured for RX-FIFO mode.
0021
0022 The RX FIFO mode uses a hardware FIFO with a depth of 6 CAN frames,
0023 while the mailbox mode uses a software FIFO with a depth of up to 62
0024 CAN frames. With the help of the bigger buffer, the mailbox mode
0025 performs better under high system load situations.
0026
0027 As reception of RTR frames is part of the CAN standard, all flexcan
0028 cores come up in a mode where RTR reception is possible.
0029
0030 With the "rx-rtr" private flag the ability to receive RTR frames can
0031 be waived at the expense of losing the ability to receive RTR
0032 messages. This trade off is beneficial in certain use cases.
0033
0034 "rx-rtr" on
0035 Receive RTR frames. (default)
0036
0037 The CAN controller can and will receive RTR frames.
0038
0039 On some IP cores the controller cannot receive RTR frames in the
0040 more performant "RX mailbox" mode and will use "RX FIFO" mode
0041 instead.
0042
0043 "rx-rtr" off
0044
0045 Waive ability to receive RTR frames. (not supported on all IP cores)
0046
0047 This mode activates the "RX mailbox mode" for better performance, on
0048 some IP cores RTR frames cannot be received anymore.
0049
0050 The setting can only be changed if the interface is down::
0051
0052 ip link set dev can0 down
0053 ethtool --set-priv-flags can0 rx-rtr {off|on}
0054 ip link set dev can0 up