<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/dma/edma.c, branch v3.12.16</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>dmaengine: edma: fix another memory leak</title>
<updated>2013-10-24T16:47:50+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2013-10-24T16:47:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7261828776b33ff434837674413df2920e9ca2ff'/>
<id>7261828776b33ff434837674413df2920e9ca2ff</id>
<content type='text'>
commit 4b6271a6 fix a menory leak but one more existed in driver so fix that

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4b6271a6 fix a menory leak but one more existed in driver so fix that

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Fix memory leak</title>
<updated>2013-10-24T16:46:15+00:00</updated>
<author>
<name>Valentin Ilie</name>
<email>valentin.ilie@gmail.com</email>
</author>
<published>2013-10-24T13:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b6271a64463f4fcbaf8b2e1d84704b7eb8c407c'/>
<id>4b6271a64463f4fcbaf8b2e1d84704b7eb8c407c</id>
<content type='text'>
When it fails to allocate a slot, edesc should be free'd before return;

Signed-off-by: Valentin Ilie &lt;valentin.ilie@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When it fails to allocate a slot, edesc should be free'd before return;

Signed-off-by: Valentin Ilie &lt;valentin.ilie@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma.c: remove edma_desc leakage</title>
<updated>2013-10-11T02:01:47+00:00</updated>
<author>
<name>Geyslan G. Bem</name>
<email>geyslan@gmail.com</email>
</author>
<published>2013-10-07T22:19:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f6d8fad0a1636e675308088c35e863d066e0949'/>
<id>2f6d8fad0a1636e675308088c35e863d066e0949</id>
<content type='text'>
Free memory allocated to edma_desc when failing to allocate slot.

Signed-off-by: Geyslan G. Bem &lt;geyslan@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Free memory allocated to edma_desc when failing to allocate slot.

Signed-off-by: Geyslan G. Bem &lt;geyslan@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edma: Update author email address</title>
<updated>2013-09-17T03:49:46+00:00</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2013-09-04T14:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d71505b6672c438af37771e92c24c1d73e943f8c'/>
<id>d71505b6672c438af37771e92c24c1d73e943f8c</id>
<content type='text'>
Matt's @ti.com address bounces.  Update the MODULE_AUTHOR information in
edma.c to his Linaro address.

Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Acked-by: Matt Porter &lt;matt.porter@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Matt's @ti.com address bounces.  Update the MODULE_AUTHOR information in
edma.c to his Linaro address.

Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Acked-by: Matt Porter &lt;matt.porter@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Remove limits on number of slots</title>
<updated>2013-09-04T13:08:46+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelf@ti.com</email>
</author>
<published>2013-08-29T23:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5622ff1a4dd7dcb1c09953d8066a4e7c4c350b2d'/>
<id>5622ff1a4dd7dcb1c09953d8066a4e7c4c350b2d</id>
<content type='text'>
With this series, this check is no longer required and
we shouldn't need to reject drivers DMA'ing more than the
MAX number of slots.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this series, this check is no longer required and
we shouldn't need to reject drivers DMA'ing more than the
MAX number of slots.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Leave linked to Null slot instead of DUMMY slot</title>
<updated>2013-09-04T13:08:46+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelf@ti.com</email>
</author>
<published>2013-08-29T23:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b267b3bc1e781cef17ce026a72c7f0392fa45ada'/>
<id>b267b3bc1e781cef17ce026a72c7f0392fa45ada</id>
<content type='text'>
Dummy slot has been used as a way for missed-events not to be
reported as missing. This has been particularly troublesome for cases
where we might want to temporarily pause all incoming events.

For EDMA DMAC, there is no way to do any such pausing of events as
the occurence of the "next" event is not software controlled.
Using "edma_pause" in IRQ handlers doesn't help as by then the event
in concern from the slave is already missed.

Linking a dummy slot, is seen to absorb these events which we didn't
want to miss. So we don't link to dummy, but instead leave it linked
to NULL set, allow an error condition and detect the channel that
missed it.

Consider the case where we have a scatter-list like:
SG1-&gt;SG2-&gt;SG3-&gt;SG4-&gt;SG5-&gt;SG6-&gt;Null

For ex, for a MAX_NR_SG of 2, earlier we were splitting this as:
SG1-&gt;SG2-&gt;Null
SG3-&gt;SG4-&gt;Null
SG5-&gt;SG6-&gt;Null

Now we split it as
SG1-&gt;SG2-&gt;Null
SG3-&gt;SG4-&gt;Null
SG5-&gt;SG6-&gt;Dummy

This approach results in lesser unwanted interrupts that occur
for the last list split. The Dummy slot has the property of not
raising an error condition if events are missed unlike the Null
slot. We are OK with this as we're done with processing the
whole list once we reach Dummy.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
[modifed duplicate s-o-b &amp; patch title]
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dummy slot has been used as a way for missed-events not to be
reported as missing. This has been particularly troublesome for cases
where we might want to temporarily pause all incoming events.

For EDMA DMAC, there is no way to do any such pausing of events as
the occurence of the "next" event is not software controlled.
Using "edma_pause" in IRQ handlers doesn't help as by then the event
in concern from the slave is already missed.

Linking a dummy slot, is seen to absorb these events which we didn't
want to miss. So we don't link to dummy, but instead leave it linked
to NULL set, allow an error condition and detect the channel that
missed it.

Consider the case where we have a scatter-list like:
SG1-&gt;SG2-&gt;SG3-&gt;SG4-&gt;SG5-&gt;SG6-&gt;Null

For ex, for a MAX_NR_SG of 2, earlier we were splitting this as:
SG1-&gt;SG2-&gt;Null
SG3-&gt;SG4-&gt;Null
SG5-&gt;SG6-&gt;Null

Now we split it as
SG1-&gt;SG2-&gt;Null
SG3-&gt;SG4-&gt;Null
SG5-&gt;SG6-&gt;Dummy

This approach results in lesser unwanted interrupts that occur
for the last list split. The Dummy slot has the property of not
raising an error condition if events are missed unlike the Null
slot. We are OK with this as we're done with processing the
whole list once we reach Dummy.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
[modifed duplicate s-o-b &amp; patch title]
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Find missed events and issue them</title>
<updated>2013-09-04T13:08:46+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelf@ti.com</email>
</author>
<published>2013-08-29T23:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c5f47990aad87deea42a330433fc57065ac1ade7'/>
<id>c5f47990aad87deea42a330433fc57065ac1ade7</id>
<content type='text'>
In an effort to move to using Scatter gather lists of any size with
EDMA as discussed at [1] instead of placing limitations on the driver,
we work through the limitations of the EDMAC hardware to find missed
events and issue them.

The sequence of events that require this are:

For the scenario where MAX slots for an EDMA channel is 3:

SG1 -&gt; SG2 -&gt; SG3 -&gt; SG4 -&gt; SG5 -&gt; SG6 -&gt; Null

The above SG list will have to be DMA'd in 2 sets:

(1) SG1 -&gt; SG2 -&gt; SG3 -&gt; Null
(2) SG4 -&gt; SG5 -&gt; SG6 -&gt; Null

After (1) is succesfully transferred, the events from the MMC controller
donot stop coming and are missed by the time we have setup the transfer
for (2). So here, we catch the events missed as an error condition and
issue them manually.

In the second part of the patch, we make handle the NULL slot cases:
For crypto IP, we continue to receive events even continuously in
NULL slot, the setup of the next set of SG elements happens after
the error handler executes. This is results in some recursion problems.
Due to this, we continously receive error interrupts when we manually
trigger an event from the error handler.

We fix this, by first detecting if the Channel is currently transferring
from a NULL slot or not, that's where the edma_read_slot in the error
callback from interrupt handler comes in. With this we can determine if
the set up of the next SG list has completed, and we manually trigger
only in this case. If the setup has _not_ completed, we are still in NULL
so we just set a missed flag and allow the manual triggerring to happen
in edma_execute which will be eventually called. This fixes the above
mentioned race conditions seen with the crypto drivers.

[1] http://marc.info/?l=linux-omap&amp;m=137416733628831&amp;w=2

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In an effort to move to using Scatter gather lists of any size with
EDMA as discussed at [1] instead of placing limitations on the driver,
we work through the limitations of the EDMAC hardware to find missed
events and issue them.

The sequence of events that require this are:

For the scenario where MAX slots for an EDMA channel is 3:

SG1 -&gt; SG2 -&gt; SG3 -&gt; SG4 -&gt; SG5 -&gt; SG6 -&gt; Null

The above SG list will have to be DMA'd in 2 sets:

(1) SG1 -&gt; SG2 -&gt; SG3 -&gt; Null
(2) SG4 -&gt; SG5 -&gt; SG6 -&gt; Null

After (1) is succesfully transferred, the events from the MMC controller
donot stop coming and are missed by the time we have setup the transfer
for (2). So here, we catch the events missed as an error condition and
issue them manually.

In the second part of the patch, we make handle the NULL slot cases:
For crypto IP, we continue to receive events even continuously in
NULL slot, the setup of the next set of SG elements happens after
the error handler executes. This is results in some recursion problems.
Due to this, we continously receive error interrupts when we manually
trigger an event from the error handler.

We fix this, by first detecting if the Channel is currently transferring
from a NULL slot or not, that's where the edma_read_slot in the error
callback from interrupt handler comes in. With this we can determine if
the set up of the next SG list has completed, and we manually trigger
only in this case. If the setup has _not_ completed, we are still in NULL
so we just set a missed flag and allow the manual triggerring to happen
in edma_execute which will be eventually called. This fixes the above
mentioned race conditions seen with the crypto drivers.

[1] http://marc.info/?l=linux-omap&amp;m=137416733628831&amp;w=2

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Write out and handle MAX_NR_SG at a given time</title>
<updated>2013-09-04T13:08:46+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelf@ti.com</email>
</author>
<published>2013-09-03T15:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=534070622d2c7fbc5cc929aa93541ccd0ae52ab1'/>
<id>534070622d2c7fbc5cc929aa93541ccd0ae52ab1</id>
<content type='text'>
Process SG-elements in batches of MAX_NR_SG if they are greater
than MAX_NR_SG. Due to this, at any given time only those many
slots will be used in the given channel no matter how long the
scatter list is. We keep track of how much has been written
inorder to process the next batch of elements in the scatter-list
and detect completion.

For such intermediate transfer completions (one batch of MAX_NR_SG),
make use of pause and resume functions instead of start and stop
when such intermediate transfer is in progress or completed as we
donot want to clear any pending events.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Process SG-elements in batches of MAX_NR_SG if they are greater
than MAX_NR_SG. Due to this, at any given time only those many
slots will be used in the given channel no matter how long the
scatter list is. We keep track of how much has been written
inorder to process the next batch of elements in the scatter-list
and detect completion.

For such intermediate transfer completions (one batch of MAX_NR_SG),
make use of pause and resume functions instead of start and stop
when such intermediate transfer is in progress or completed as we
donot want to clear any pending events.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dma: edma: Setup parameters to DMA MAX_NR_SG at a time</title>
<updated>2013-09-04T13:08:46+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelf@ti.com</email>
</author>
<published>2013-08-29T23:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6fbe24da828ff344372c38441156caefc4a51b3e'/>
<id>6fbe24da828ff344372c38441156caefc4a51b3e</id>
<content type='text'>
Changes are made here for configuring existing parameters to support
DMA'ing them out in batches as needed.

Also allocate as many as slots as needed by the SG list, but not more
than MAX_NR_SG. Then these slots will be reused accordingly.
For ex, if MAX_NR_SG=10, and number of SG entries is 40, still only
10 slots will be allocated to DMA the entire SG list of size 40.

Also enable TC interrupts for slots that are a last in a current
iteration, or that fall on a MAX_NR_SG boundary.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes are made here for configuring existing parameters to support
DMA'ing them out in batches as needed.

Also allocate as many as slots as needed by the SG list, but not more
than MAX_NR_SG. Then these slots will be reused accordingly.
For ex, if MAX_NR_SG=10, and number of SG entries is 40, still only
10 slots will be allocated to DMA the entire SG list of size 40.

Also enable TC interrupts for slots that are a last in a current
iteration, or that fall on a MAX_NR_SG boundary.

Signed-off-by: Joel Fernandes &lt;joelf@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edma: no need to assign residue to 0 explicitly</title>
<updated>2013-08-05T04:02:24+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2013-05-27T12:14:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=43e33e484e3119520a26567f6e9f195617463b05'/>
<id>43e33e484e3119520a26567f6e9f195617463b05</id>
<content type='text'>
Residue value is assigned to 0 by dma_cookie_status().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Residue value is assigned to 0 by dma_cookie_status().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
