<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/at_xdmac.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-12T14:42:26Z</updated>
<entry>
<title>dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly</title>
<updated>2022-07-12T14:42:26Z</updated>
<author>
<name>Michael Walle</name>
</author>
<published>2022-05-26T13:51:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca05155b39404f0a44afab2d18fad0ddf89f290c'/>
<id>urn:sha1:ca05155b39404f0a44afab2d18fad0ddf89f290c</id>
<content type='text'>
commit 3770d92bd5237d686e49da7b2fb86f53ee6ed259 upstream.

It seems that it is valid to have less than the requested number of
descriptors. But what is not valid and leads to subsequent errors is to
have zero descriptors. In that case, abort the probing.

Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220526135111.1470926-1-michael@walle.cc
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>dma: at_xdmac: fix a missing check on list iterator</title>
<updated>2022-04-11T13:33:29Z</updated>
<author>
<name>Xiaomeng Tong</name>
</author>
<published>2022-03-27T06:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=206680c4e46b62fd8909385e0874a36952595b85'/>
<id>urn:sha1:206680c4e46b62fd8909385e0874a36952595b85</id>
<content type='text'>
The bug is here:
	__func__, desc, &amp;desc-&gt;tx_dma_desc.phys, ret, cookie, residue);

The list iterator 'desc' will point to a bogus position containing
HEAD if the list is empty or no element is found. To avoid dev_dbg()
prints a invalid address, use a new variable 'iter' as the list
iterator, while use the origin variable 'desc' as a dedicated
pointer to point to the found element.

Cc: stable@vger.kernel.org
Fixes: 82e2424635f4c ("dmaengine: xdmac: fix print warning on dma_addr_t variable")
Signed-off-by: Xiaomeng Tong &lt;xiam0nd.tong@gmail.com&gt;
Link: https://lore.kernel.org/r/20220327061154.4867-1-xiam0nd.tong@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet()</title>
<updated>2022-02-15T05:26:04Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-01-07T02:40:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa7accb7f91c4c2c98bfdde62446d96ecc1ef2c6'/>
<id>urn:sha1:aa7accb7f91c4c2c98bfdde62446d96ecc1ef2c6</id>
<content type='text'>
Add the missing unlock before return from at_xdmac_tasklet().

Fixes: e77e561925df ("dmaengine: at_xdmac: Fix race over irq_status")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20220107024047.1051915-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Fix race over irq_status</title>
<updated>2022-01-05T10:20:04Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e77e561925df2faf77a41896df24a59141a445c9'/>
<id>urn:sha1:e77e561925df2faf77a41896df24a59141a445c9</id>
<content type='text'>
Tasklets run with interrupts enabled, so we need to protect
atchan-&gt;irq_status with spin_lock_irq() otherwise the tasklet can be
interrupted by the IRQ that modifies irq_status. Move the dev_dbg that
prints the irq_status in at_xdmac_handle_cyclic() and lower in
at_xdmac_tasklet() where the IRQ is disabled.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-13-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_tasklet()</title>
<updated>2022-01-05T10:20:04Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a61210cae80cac0701d5aca9551466a389717fd2'/>
<id>urn:sha1:a61210cae80cac0701d5aca9551466a389717fd2</id>
<content type='text'>
Apart of making the code easier to read, this patch is a prerequisite for
a functional change: tasklets run with interrupts enabled, so we need to
protect atchan-&gt;irq_status with spin_lock_irq() otherwise the tasklet can
be interrupted by the IRQ that modifies irq_status. atchan-&gt;irq_status
will be protected in a further patch.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-12-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Fix at_xdmac_lld struct definition</title>
<updated>2022-01-05T10:20:04Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=912f7c6f7fac273f40e621447cf17d14b50d6e5b'/>
<id>urn:sha1:912f7c6f7fac273f40e621447cf17d14b50d6e5b</id>
<content type='text'>
The hardware channel next descriptor view structure contains just
fields of 32 bits, while dma_addr_t can be of type u64 or u32
depending on CONFIG_ARCH_DMA_ADDR_T_64BIT. Force u32 to comply with
what the hardware expects.

Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-11-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Fix lld view setting</title>
<updated>2022-01-05T10:20:04Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1385eb4d14d447cc5d744bc2ac34f43be66c9963'/>
<id>urn:sha1:1385eb4d14d447cc5d744bc2ac34f43be66c9963</id>
<content type='text'>
AT_XDMAC_CNDC_NDVIEW_NDV3 was set even for AT_XDMAC_MBR_UBC_NDV2,
because of the wrong bit handling. Fix it.

Fixes: ee0fe35c8dcd ("dmaengine: xdmac: Handle descriptor's view 3 registers")
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-10-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_advance_work()</title>
<updated>2022-01-05T10:20:03Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42468aa8b1aa4d7d4d9b56b1d2959d34b7e27575'/>
<id>urn:sha1:42468aa8b1aa4d7d4d9b56b1d2959d34b7e27575</id>
<content type='text'>
It's easier to read code with fewer levels of indentation, remove a level
of indentation in at_xdmac_advance_work()

if (!foo() &amp; !bar()) {
}

was replaced by:

if (foo() || bar())
	return;

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-9-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Fix concurrency over xfers_list</title>
<updated>2022-01-05T10:20:03Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18deddea9184b62941395889ff7659529c877326'/>
<id>urn:sha1:18deddea9184b62941395889ff7659529c877326</id>
<content type='text'>
Since tx_submit can be called from a hard IRQ, xfers_list must be
protected with a lock to avoid concurency on the list's elements.
Since at_xdmac_handle_cyclic() is called from a tasklet, spin_lock_irq
is enough to protect from a hard IRQ.

Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-8-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: Move the free desc to the tail of the desc list</title>
<updated>2022-01-05T10:20:03Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2021-12-15T11:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=801db90bf294f647b967e8d99b9ae121bea63d0d'/>
<id>urn:sha1:801db90bf294f647b967e8d99b9ae121bea63d0d</id>
<content type='text'>
Move the free desc to the tail of the list, so that the sequence of
descriptors is more track-able in case of debug. One would know which
descriptor should come next and could easier catch concurrency over
descriptors for example. virt-dma uses list_splice_tail_init() as well,
follow the core driver.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20211215110115.191749-7-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
