Commit d5c8725c authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'linux-can-next-for-5.17-20220108' of...

Merge tag 'linux-can-next-for-5.17-20220108' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next



Marc Kleine-Budde says:

====================
pull-request: can-next 2022-01-08

this is a pull request of 22 patches for net-next/master.

The first patch is by Tom Rix and fixes an uninitialized variable in
the janz-ican3 driver (introduced in linux-can-next-for-5.17-20220105).

The next 13 patches are by my and target the mcp251xfd driver. First
several cleanup patches, then the driver is prepared for the upcoming
ethtool ring parameter and IRQ coalescing support, which is added in a
later pull request.

The remaining 8 patches are by Dario Binacchi and me and enhance the
flexcan driver. The driver is moved into a sub directory. An ethtool
private flag is added to optionally disable CAN RTR frame reception,
to make use of more RX buffers. The resulting RX buffer configuration
can be read by ethtool ring parameter support. Finally documentation
for the ethtool private flag is added to the
Documentation/networking/device_drivers/can directory.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 82192cb4 bc3897f7
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0+

=============================
Flexcan CAN Controller driver
=============================

Authors: Marc Kleine-Budde <mkl@pengutronix.de>,
Dario Binacchi <dario.binacchi@amarula.solutions.com>

On/off RTR frames reception
===========================

For most flexcan IP cores the driver supports 2 RX modes:

- FIFO
- mailbox

The older flexcan cores (integrated into the i.MX25, i.MX28, i.MX35
and i.MX53 SOCs) only receive RTR frames if the controller is
configured for RX-FIFO mode.

The RX FIFO mode uses a hardware FIFO with a depth of 6 CAN frames,
while the mailbox mode uses a software FIFO with a depth of up to 62
CAN frames. With the help of the bigger buffer, the mailbox mode
performs better under high system load situations.

As reception of RTR frames is part of the CAN standard, all flexcan
cores come up in a mode where RTR reception is possible.

With the "rx-rtr" private flag the ability to receive RTR frames can
be waived at the expense of losing the ability to receive RTR
messages. This trade off is beneficial in certain use cases.

"rx-rtr" on
  Receive RTR frames. (default)

  The CAN controller can and will receive RTR frames.

  On some IP cores the controller cannot receive RTR frames in the
  more performant "RX mailbox" mode and will use "RX FIFO" mode
  instead.

"rx-rtr" off

  Waive ability to receive RTR frames. (not supported on all IP cores)

  This mode activates the "RX mailbox mode" for better performance, on
  some IP cores RTR frames cannot be received anymore.

The setting can only be changed if the interface is down::

    ip link set dev can0 down
    ethtool --set-priv-flags can0 rx-rtr {off|on}
    ip link set dev can0 up
+20 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Controller Area Network (CAN) Device Drivers
============================================

Device drivers for CAN devices.

Contents:

.. toctree::
   :maxdepth: 2

   freescale/flexcan

.. only::  subproject and html

   Indices
   =======

   * :ref:`genindex`
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Contents:
   appletalk/index
   atm/index
   cable/index
   can/index
   cellular/index
   ethernet/index
   fddi/index
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ obj-y += softing/
obj-$(CONFIG_CAN_AT91)		+= at91_can.o
obj-$(CONFIG_CAN_CC770)		+= cc770/
obj-$(CONFIG_CAN_C_CAN)		+= c_can/
obj-$(CONFIG_CAN_FLEXCAN)	+= flexcan.o
obj-$(CONFIG_CAN_FLEXCAN)	+= flexcan/
obj-$(CONFIG_CAN_GRCAN)		+= grcan.o
obj-$(CONFIG_CAN_IFI_CANFD)	+= ifi_canfd/
obj-$(CONFIG_CAN_JANZ_ICAN3)	+= janz-ican3.o
+7 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_CAN_FLEXCAN) += flexcan.o

flexcan-objs :=
flexcan-objs += flexcan-core.o
flexcan-objs += flexcan-ethtool.o
Loading