<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/can/m_can, branch linux-6.9.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-02-14T12:44:02+00:00</updated>
<entry>
<title>can: tcan4x5x: support resuming from rx interrupt signal</title>
<updated>2024-02-14T12:44:02+00:00</updated>
<author>
<name>Martin Hundebøll</name>
<email>martin@geanix.com</email>
</author>
<published>2023-11-13T13:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b6b640c04446887486edd76b215f81668c7e6005'/>
<id>urn:sha1:b6b640c04446887486edd76b215f81668c7e6005</id>
<content type='text'>
Implement the "wakeup-source" device tree property, so the chip is left
running when suspending, and its rx interrupt is used as a wakeup source
to resume operation.

Signed-off-by: Martin Hundebøll &lt;martin@geanix.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: allow keeping the transceiver running in suspend</title>
<updated>2024-02-14T12:44:02+00:00</updated>
<author>
<name>Martin Hundebøll</name>
<email>martin@geanix.com</email>
</author>
<published>2023-11-13T13:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a94d7e31cf5ab33f43ed381c35aabb0d1f2748d'/>
<id>urn:sha1:4a94d7e31cf5ab33f43ed381c35aabb0d1f2748d</id>
<content type='text'>
Add a flag to the device class structure that leaves the chip in a
running state with rx interrupt enabled, so that an m_can device driver
can configure and use the interrupt as a wakeup source.

Signed-off-by: Martin Hundebøll &lt;martin@geanix.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: remove redundant check for pm_clock_support</title>
<updated>2024-02-14T10:24:30+00:00</updated>
<author>
<name>Francesco Dolcini</name>
<email>francesco.dolcini@toradex.com</email>
</author>
<published>2024-01-04T23:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e517293fd72d9044902efae59f05203203a60736'/>
<id>urn:sha1:e517293fd72d9044902efae59f05203203a60736</id>
<content type='text'>
m_can_clk_start() already skip starting the clock when
clock support is disabled, remove the redundant check in
m_can_class_register().

This also solves the imbalance with m_can_clk_stop() that is called
afterward in the same function before the return.

Signed-off-by: Francesco Dolcini &lt;francesco.dolcini@toradex.com&gt;
Reviewed-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240104235723.46931-1-francesco@dolcini.it
[mkl: rebased to net-next/main]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Implement transmit submission coalescing</title>
<updated>2024-02-12T16:02:45+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c306c3873de0804bea4bb2ac717bd2c088acc589'/>
<id>urn:sha1:c306c3873de0804bea4bb2ac717bd2c088acc589</id>
<content type='text'>
m_can supports submitting multiple transmits with one register write.
This is an interesting option to reduce the number of SPI transfers for
peripheral chips.

The m_can_tx_op is extended with a bool that signals if it is the last
transmission and the submit should be executed immediately.

The worker then writes the skb to the FIFO and submits it only if the
submit bool is set. If it isn't set, the worker will write the next skb
which is waiting in the workqueue to the FIFO, etc.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-15-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Implement BQL</title>
<updated>2024-02-12T16:02:45+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=251f913d19a8a960126359c20bd5719461e5399f'/>
<id>urn:sha1:251f913d19a8a960126359c20bd5719461e5399f</id>
<content type='text'>
Implement byte queue limiting in preparation for the use of xmit_more().

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-14-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Use tx_fifo_in_flight for netif_queue control</title>
<updated>2024-02-12T16:02:44+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7508a10ca295c635fad9c9f34ac96384d806af89'/>
<id>urn:sha1:7508a10ca295c635fad9c9f34ac96384d806af89</id>
<content type='text'>
The network queue is currently always stopped in start_xmit and
continued in the interrupt handler. This is not possible anymore if we
want to keep multiple transmits in flight in parallel.

Use the previously introduced tx_fifo_in_flight counter to control the
network queue instead. This has the benefit of not needing to ask the
hardware about fifo status.

This patch stops the network queue in start_xmit if the number of
transmits in flight reaches the size of the fifo and wakes up the queue
from the interrupt handler once the transmits in flight drops below the
fifo size. This means any skbs over the limit will be rejected
immediately in start_xmit (it shouldn't be possible at all to reach that
state anyways).

The maximum number of transmits in flight is the size of the fifo.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-13-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Introduce a tx_fifo_in_flight counter</title>
<updated>2024-02-12T16:02:44+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1fa80e23c15051edc1c594270517de3517ded798'/>
<id>urn:sha1:1fa80e23c15051edc1c594270517de3517ded798</id>
<content type='text'>
Keep track of the number of transmits in flight.

This patch prepares the driver to control the network interface queue
based on this counter. By itself this counter be
implemented with an atomic, but as we need to do other things in the
critical sections later I am using a spinlock instead.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-12-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Use the workqueue as queue</title>
<updated>2024-02-12T16:02:44+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e668673ed3992579f23413a13d7ed314cb62ee74'/>
<id>urn:sha1:e668673ed3992579f23413a13d7ed314cb62ee74</id>
<content type='text'>
The current implementation uses the workqueue for peripheral chips to
submit work. Only a single work item is queued and used at any time.

To be able to keep more than one transmit in flight at a time, prepare
the workqueue to support multiple transmits at the same time.

Each work item now has a separate storage for a skb and a pointer to
cdev. This assures that each workitem can be processed individually.

The workqueue is replaced by an ordered workqueue which makes sure that
only a single worker processes the items queued on the workqueue. Also
items are ordered by the order they were enqueued. This removes most of
the concurrency the workqueue normally offers. It is not necessary for
this driver.

The cleanup functions have to be adopted a bit to handle this new
mechanism.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-11-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Cache tx putidx</title>
<updated>2024-02-12T16:02:44+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80c5bac02a820dc569e38e102456ec4b34f6f607'/>
<id>urn:sha1:80c5bac02a820dc569e38e102456ec4b34f6f607</id>
<content type='text'>
m_can_tx_handler is the only place where data is written to the tx fifo.
We can calculate the putidx in the driver code here to avoid the
dependency on the txfqs register.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-10-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Use u32 for putidx</title>
<updated>2024-02-12T16:02:44+00:00</updated>
<author>
<name>Markus Schneider-Pargmann</name>
<email>msp@baylibre.com</email>
</author>
<published>2024-02-07T09:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14f0a0a4407ebb6f36eb7d394d497d4632c654dc'/>
<id>urn:sha1:14f0a0a4407ebb6f36eb7d394d497d4632c654dc</id>
<content type='text'>
putidx is not an integer normally, it is an unsigned field used in
hardware registers. Use a u32 for it.

Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/all/20240207093220.2681425-9-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
