<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/dma/cppi41.c, branch v4.14.263</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-11-06T11:43:36+00:00</updated>
<entry>
<title>dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle</title>
<updated>2019-11-06T11:43:36+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-23T15:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a7313ae7163cb2c206abf071a4e098a3ba7f140'/>
<id>urn:sha1:7a7313ae7163cb2c206abf071a4e098a3ba7f140</id>
<content type='text'>
commit bacdcb6675e170bb2e8d3824da220e10274f42a7 upstream.

Yegor Yefremov &lt;yegorslists@googlemail.com&gt; reported that musb and ftdi
uart can fail for the first open of the uart unless connected using
a hub.

This is because the first dma call done by musb_ep_program() must wait
if cppi41 is PM runtime suspended. Otherwise musb_ep_program() continues
with other non-dma packets before the DMA transfer is started causing at
least ftdi uarts to fail to receive data.

Let's fix the issue by waking up cppi41 with PM runtime calls added to
cppi41_dma_prep_slave_sg() and return NULL if still idled. This way we
have musb_ep_program() continue with PIO until cppi41 is awake.

Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support")
Reported-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: stable@vger.kernel.org # v4.9+
Link: https://lore.kernel.org/r/20191023153138.23442-1-tony@atomide.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: cppi41: delete channel from pending list when stop channel</title>
<updated>2018-12-13T08:18:52+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2018-11-12T15:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e47a6e68c3bbfebb6d6f336d92884df37b722e4b'/>
<id>urn:sha1:e47a6e68c3bbfebb6d6f336d92884df37b722e4b</id>
<content type='text'>
commit 59861547ec9a9736e7882f6fb0c096a720ff811a upstream.

The driver defines three states for a cppi channel.
- idle: .chan_busy == 0 &amp;&amp; not in .pending list
- pending: .chan_busy == 0 &amp;&amp; in .pending list
- busy: .chan_busy == 1 &amp;&amp; not in .pending list

There are cases in which the cppi channel could be in the pending state
when cppi41_dma_issue_pending() is called after cppi41_runtime_suspend()
is called.

cppi41_stop_chan() has a bug for these cases to set channels to idle state.
It only checks the .chan_busy flag, but not the .pending list, then later
when cppi41_runtime_resume() is called the channels in .pending list will
be transitioned to busy state.

Removing channels from the .pending list solves the problem.

Fixes: 975faaeb9985 ("dma: cppi41: start tear down only if channel is busy")
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe()</title>
<updated>2017-04-06T07:11:59+00:00</updated>
<author>
<name>Alexandre Bailon</name>
<email>abailon@baylibre.com</email>
</author>
<published>2017-04-05T16:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eda6f4e868e74adfae8ac6b06a863a090affbb14'/>
<id>urn:sha1:eda6f4e868e74adfae8ac6b06a863a090affbb14</id>
<content type='text'>
This fix an Oops happening on all platforms using the old dt bindings
(all platforms but da8xx).
This update cppi41_dma_probe() to use the index variable which is
required to keep compatibility between old and new dt bindings.

Fixes: 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()")
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi: fix build error due to bad variable</title>
<updated>2017-03-27T08:14:51+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2017-03-27T08:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7fd724e01939f777781a86d078c3b7142fb9c03'/>
<id>urn:sha1:d7fd724e01939f777781a86d078c3b7142fb9c03</id>
<content type='text'>
Commit 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()")
moved the code to devm_* but erranously changed a varible name, so fix it.

drivers/dma/cppi41.c:1052:5: error: 'struct cppi41_dd' has no member named 'qmrg_mem'
  cdd-&gt;qmrg_mem = devm_ioremap_resource(dev, mem);
     ^
drivers/dma/cppi41.c:1053:16: error: 'struct cppi41_dd' has no member named 'qmrg_mem'
  if (IS_ERR(cdd-&gt;qmrg_mem))
                ^
drivers/dma/cppi41.c:1054:21: error: 'struct cppi41_dd' has no member named 'qmrg_mem'
   return PTR_ERR(cdd-&gt;qmrg_mem);
                     ^

Fixes: 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()")
Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: use managed functions devm_*()</title>
<updated>2017-03-27T05:19:34+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-03-16T14:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e3ba95f41901e0da0bb3151ed696dca6f7ec511'/>
<id>urn:sha1:8e3ba95f41901e0da0bb3151ed696dca6f7ec511</id>
<content type='text'>
This makes the error handling much more simpler than open-coding
everything and in addition makes the probe function smaller an tidier.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: fix cppi41_dma_tx_status() logic</title>
<updated>2017-03-27T05:19:34+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-03-16T14:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a08f2673dde1aaba22c79ed016d5901f1b042401'/>
<id>urn:sha1:a08f2673dde1aaba22c79ed016d5901f1b042401</id>
<content type='text'>
It makes sense to set residue when channel is in progress. Otherwise it
should be 0 since transfer is completed. Meanwhile this patch doesn't
prevent to set residue value anyway.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: Fix teardown warnings</title>
<updated>2017-03-07T08:12:28+00:00</updated>
<author>
<name>Alexandre Bailon</name>
<email>abailon@baylibre.com</email>
</author>
<published>2017-01-30T17:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f68b09ea3ed5b9619568625d967569da055f487'/>
<id>urn:sha1:4f68b09ea3ed5b9619568625d967569da055f487</id>
<content type='text'>
During the teardown of a RX channel, because there is only one
completion queue available for RX channel, descriptor of another
channel may be popped which will cause 2 warnings:
- the first one because we popped a wrong descriptor
  (neither the channel's descriptor, nor the teardown descriptor).
- the second one happen during the teardown of another channel,
  because we can't find the channel descriptor
  (that is, the one that caused the first warning).
To avoid that, use one free queue instead of a transmit completion queue.

Note that fix doesn't fix all the teardown warnings:
I still get some when I run some corner case.

Signed-off-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: Add support of DA8xx to CPPI 4.1</title>
<updated>2017-03-07T08:12:27+00:00</updated>
<author>
<name>Alexandre Bailon</name>
<email>abailon@baylibre.com</email>
</author>
<published>2017-01-30T17:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3fa49acf00a6db3bfdee725ac5d688dd98dc2c9'/>
<id>urn:sha1:e3fa49acf00a6db3bfdee725ac5d688dd98dc2c9</id>
<content type='text'>
The DA8xx has a CPPI 4.1 DMA controller.
This is add the glue layer required to make it work on DA8xx.

Signed-off-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: Remove isr callback from glue layer</title>
<updated>2017-03-07T08:08:25+00:00</updated>
<author>
<name>Alexandre Bailon</name>
<email>abailon@baylibre.com</email>
</author>
<published>2017-02-15T13:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a15382b75b903fa918a3a3c4d3b87e8061790312'/>
<id>urn:sha1:a15382b75b903fa918a3a3c4d3b87e8061790312</id>
<content type='text'>
All the platform code to manage IRQ has been moved to MUSB,
and now the interrupt handler is completely generic.
Remove the isr callback that is not useful anymore.

Signed-off-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: cppi41: init_sched(): Get number of channels from DT</title>
<updated>2017-03-07T08:08:25+00:00</updated>
<author>
<name>Alexandre Bailon</name>
<email>abailon@baylibre.com</email>
</author>
<published>2017-02-15T13:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e46fe98ab658eab817398abd895908854bb4c43'/>
<id>urn:sha1:5e46fe98ab658eab817398abd895908854bb4c43</id>
<content type='text'>
Despite the driver is already using DT to get the number of channels,
init_sched() is using an hardcoded value to get it.
Use DT to get the number of channels.

Signed-off-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
</feed>
