<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/dma, branch v3.0.79</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>pch_dma: Use GFP_ATOMIC because called from interrupt context</title>
<updated>2013-05-19T17:04:47+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya.rohm@gmail.com</email>
</author>
<published>2013-02-12T02:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b89396eaa22b921245b4d30f7e26e406e89aa51c'/>
<id>b89396eaa22b921245b4d30f7e26e406e89aa51c</id>
<content type='text'>
commit 5c1ef59168c485318e40ba485c1eba57d81d0faa upstream.

pdc_desc_get() is called from pd_prep_slave_sg, and the function is
called from interrupt context(e.g. Uart driver "pch_uart.c").
In fact, I saw kernel error message.
So, GFP_ATOMIC must be used not GFP_NOIO.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5c1ef59168c485318e40ba485c1eba57d81d0faa upstream.

pdc_desc_get() is called from pd_prep_slave_sg, and the function is
called from interrupt context(e.g. Uart driver "pch_uart.c").
In fact, I saw kernel error message.
So, GFP_ATOMIC must be used not GFP_NOIO.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ioat: Fix DMA memory sync direction correct flag</title>
<updated>2013-01-28T04:46:29+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.khan@hp.com</email>
</author>
<published>2012-10-25T16:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be6ee99fe4380b6b1a50e15c4bdb3cdd719620fc'/>
<id>be6ee99fe4380b6b1a50e15c4bdb3cdd719620fc</id>
<content type='text'>
commit ac4989874af56435c308bdde9ad9c837a26f8b23 upstream.

ioat does DMA memory sync with DMA_TO_DEVICE direction on a buffer allocated
for DMA_FROM_DEVICE dma, resulting in the following warning from dma debug.
Fixed the dma_sync_single_for_device() call to use the correct direction.

[  226.288947] WARNING: at lib/dma-debug.c:990 check_sync+0x132/0x550()
[  226.288948] Hardware name: ProLiant DL380p Gen8
[  226.288951] ioatdma 0000:00:04.0: DMA-API: device driver syncs DMA memory with different direction [device address=0x00000000ffff7000] [size=4096 bytes] [mapped with DMA_FROM_DEVICE] [synced with DMA_TO_DEVICE]
[  226.288953] Modules linked in: iTCO_wdt(+) sb_edac(+) ioatdma(+) microcode serio_raw pcspkr edac_core hpwdt(+) iTCO_vendor_support hpilo(+) dca acpi_power_meter ata_generic pata_acpi sd_mod crc_t10dif ata_piix libata hpsa tg3 netxen_nic(+) sunrpc dm_mirror dm_region_hash dm_log dm_mod
[  226.288967] Pid: 1055, comm: work_for_cpu Tainted: G        W    3.3.0-0.20.el7.x86_64 #1
[  226.288968] Call Trace:
[  226.288974]  [&lt;ffffffff810644cf&gt;] warn_slowpath_common+0x7f/0xc0
[  226.288977]  [&lt;ffffffff810645c6&gt;] warn_slowpath_fmt+0x46/0x50
[  226.288980]  [&lt;ffffffff81345502&gt;] check_sync+0x132/0x550
[  226.288983]  [&lt;ffffffff81345c9f&gt;] debug_dma_sync_single_for_device+0x3f/0x50
[  226.288988]  [&lt;ffffffff81661002&gt;] ? wait_for_common+0x72/0x180
[  226.288995]  [&lt;ffffffffa019590f&gt;] ioat_xor_val_self_test+0x3e5/0x832 [ioatdma]
[  226.288999]  [&lt;ffffffff811a5739&gt;] ? kfree+0x259/0x270
[  226.289004]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289008]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]
[  226.289011]  [&lt;ffffffffa0195f51&gt;] ioat3_dma_probe+0x1d5/0x2aa [ioatdma]
[  226.289016]  [&lt;ffffffffa0194d12&gt;] ioat_pci_probe+0x139/0x17c [ioatdma]
[  226.289020]  [&lt;ffffffff81354b8c&gt;] local_pci_probe+0x5c/0xd0
[  226.289023]  [&lt;ffffffff81083e50&gt;] ? destroy_work_on_stack+0x20/0x20
[  226.289025]  [&lt;ffffffff81083e68&gt;] do_work_for_cpu+0x18/0x30
[  226.289029]  [&lt;ffffffff8108d997&gt;] kthread+0xb7/0xc0
[  226.289033]  [&lt;ffffffff8166cef4&gt;] kernel_thread_helper+0x4/0x10
[  226.289036]  [&lt;ffffffff81662d20&gt;] ? _raw_spin_unlock_irq+0x30/0x50
[  226.289038]  [&lt;ffffffff81663234&gt;] ? retint_restore_args+0x13/0x13
[  226.289041]  [&lt;ffffffff8108d8e0&gt;] ? kthread_worker_fn+0x1a0/0x1a0
[  226.289044]  [&lt;ffffffff8166cef0&gt;] ? gs_change+0x13/0x13
[  226.289045] ---[ end trace e1618afc7a606089 ]---
[  226.289047] Mapped at:
[  226.289048]  [&lt;ffffffff81345307&gt;] debug_dma_map_page+0x87/0x150
[  226.289050]  [&lt;ffffffffa019653c&gt;] dma_map_page.constprop.18+0x70/0xb34 [ioatdma]
[  226.289054]  [&lt;ffffffffa0195702&gt;] ioat_xor_val_self_test+0x1d8/0x832 [ioatdma]
[  226.289058]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289061]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]

Signed-off-by: Shuah Khan &lt;shuah.khan@hp.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ac4989874af56435c308bdde9ad9c837a26f8b23 upstream.

ioat does DMA memory sync with DMA_TO_DEVICE direction on a buffer allocated
for DMA_FROM_DEVICE dma, resulting in the following warning from dma debug.
Fixed the dma_sync_single_for_device() call to use the correct direction.

[  226.288947] WARNING: at lib/dma-debug.c:990 check_sync+0x132/0x550()
[  226.288948] Hardware name: ProLiant DL380p Gen8
[  226.288951] ioatdma 0000:00:04.0: DMA-API: device driver syncs DMA memory with different direction [device address=0x00000000ffff7000] [size=4096 bytes] [mapped with DMA_FROM_DEVICE] [synced with DMA_TO_DEVICE]
[  226.288953] Modules linked in: iTCO_wdt(+) sb_edac(+) ioatdma(+) microcode serio_raw pcspkr edac_core hpwdt(+) iTCO_vendor_support hpilo(+) dca acpi_power_meter ata_generic pata_acpi sd_mod crc_t10dif ata_piix libata hpsa tg3 netxen_nic(+) sunrpc dm_mirror dm_region_hash dm_log dm_mod
[  226.288967] Pid: 1055, comm: work_for_cpu Tainted: G        W    3.3.0-0.20.el7.x86_64 #1
[  226.288968] Call Trace:
[  226.288974]  [&lt;ffffffff810644cf&gt;] warn_slowpath_common+0x7f/0xc0
[  226.288977]  [&lt;ffffffff810645c6&gt;] warn_slowpath_fmt+0x46/0x50
[  226.288980]  [&lt;ffffffff81345502&gt;] check_sync+0x132/0x550
[  226.288983]  [&lt;ffffffff81345c9f&gt;] debug_dma_sync_single_for_device+0x3f/0x50
[  226.288988]  [&lt;ffffffff81661002&gt;] ? wait_for_common+0x72/0x180
[  226.288995]  [&lt;ffffffffa019590f&gt;] ioat_xor_val_self_test+0x3e5/0x832 [ioatdma]
[  226.288999]  [&lt;ffffffff811a5739&gt;] ? kfree+0x259/0x270
[  226.289004]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289008]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]
[  226.289011]  [&lt;ffffffffa0195f51&gt;] ioat3_dma_probe+0x1d5/0x2aa [ioatdma]
[  226.289016]  [&lt;ffffffffa0194d12&gt;] ioat_pci_probe+0x139/0x17c [ioatdma]
[  226.289020]  [&lt;ffffffff81354b8c&gt;] local_pci_probe+0x5c/0xd0
[  226.289023]  [&lt;ffffffff81083e50&gt;] ? destroy_work_on_stack+0x20/0x20
[  226.289025]  [&lt;ffffffff81083e68&gt;] do_work_for_cpu+0x18/0x30
[  226.289029]  [&lt;ffffffff8108d997&gt;] kthread+0xb7/0xc0
[  226.289033]  [&lt;ffffffff8166cef4&gt;] kernel_thread_helper+0x4/0x10
[  226.289036]  [&lt;ffffffff81662d20&gt;] ? _raw_spin_unlock_irq+0x30/0x50
[  226.289038]  [&lt;ffffffff81663234&gt;] ? retint_restore_args+0x13/0x13
[  226.289041]  [&lt;ffffffff8108d8e0&gt;] ? kthread_worker_fn+0x1a0/0x1a0
[  226.289044]  [&lt;ffffffff8166cef0&gt;] ? gs_change+0x13/0x13
[  226.289045] ---[ end trace e1618afc7a606089 ]---
[  226.289047] Mapped at:
[  226.289048]  [&lt;ffffffff81345307&gt;] debug_dma_map_page+0x87/0x150
[  226.289050]  [&lt;ffffffffa019653c&gt;] dma_map_page.constprop.18+0x70/0xb34 [ioatdma]
[  226.289054]  [&lt;ffffffffa0195702&gt;] ioat_xor_val_self_test+0x1d8/0x832 [ioatdma]
[  226.289058]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289061]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]

Signed-off-by: Shuah Khan &lt;shuah.khan@hp.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: at_hdmac: check that each sg data length is non-null</title>
<updated>2012-10-02T16:47:37+00:00</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@atmel.com</email>
</author>
<published>2012-09-11T15:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e24fd5136ca6d256900392565dfc895d5a2ed9b2'/>
<id>e24fd5136ca6d256900392565dfc895d5a2ed9b2</id>
<content type='text'>
commit c456797681db814f4f5b36909e8e94047bf53d9c upstream.

Avoid the construction of a malformed DMA request sent to
the DMA controller.
Log message is for debug only because this condition is unlikely to
append and may only trigger at driver development time.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c456797681db814f4f5b36909e8e94047bf53d9c upstream.

Avoid the construction of a malformed DMA request sent to
the DMA controller.
Log message is for debug only because this condition is unlikely to
append and may only trigger at driver development time.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: at_hdmac: fix comment in atc_prep_slave_sg()</title>
<updated>2012-10-02T16:47:37+00:00</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@atmel.com</email>
</author>
<published>2012-09-11T15:21:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b77c2c77ade979204e5c6915c61e1d6196f70c5'/>
<id>5b77c2c77ade979204e5c6915c61e1d6196f70c5</id>
<content type='text'>
commit c618a9be0e8c0f36baee2560860a0118a428fb26 upstream.

s/dma_memcpy/slave_sg/ and it is sg length that we are
talking about.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c618a9be0e8c0f36baee2560860a0118a428fb26 upstream.

s/dma_memcpy/slave_sg/ and it is sg length that we are
talking about.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: at_hdmac: remove clear-on-read in atc_dostart()</title>
<updated>2012-05-07T15:56:33+00:00</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@atmel.com</email>
</author>
<published>2012-04-16T12:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=17a766decb63b6fe4c43c06069b92b4958d7a642'/>
<id>17a766decb63b6fe4c43c06069b92b4958d7a642</id>
<content type='text'>
commit ed8b0d67f33518a16c6b2450fe5ebebf180c2d04 upstream.

This loop on EBCISR register was designed to clear IRQ sources before enabling
a DMA channel. This register is clear-on-read so a race condition can appear if
another channel is already active and has just finished its transfer.
Removing this read on EBCISR is fixing the issue as there is no case where an IRQ
could be pending: we already make sure that this register is drained at probe()
time and during resume.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ed8b0d67f33518a16c6b2450fe5ebebf180c2d04 upstream.

This loop on EBCISR register was designed to clear IRQ sources before enabling
a DMA channel. This register is clear-on-read so a race condition can appear if
another channel is already active and has just finished its transfer.
Removing this read on EBCISR is fixing the issue as there is no case where an IRQ
could be pending: we already make sure that this register is drained at probe()
time and during resume.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_dma: Support new device LAPIS Semiconductor ML7831 IOH</title>
<updated>2012-04-22T23:21:44+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya.rohm@gmail.com</email>
</author>
<published>2011-11-17T07:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=127f90d6ff47e9095261f442d1ad511930cd7fd4'/>
<id>127f90d6ff47e9095261f442d1ad511930cd7fd4</id>
<content type='text'>
commit ca7fe2db892dcf91b2c72ee352eda4ff867903a7 upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ca7fe2db892dcf91b2c72ee352eda4ff867903a7 upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_dma: Fix suspend issue</title>
<updated>2012-04-22T23:21:44+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.lapis-semi.com</email>
</author>
<published>2011-10-11T12:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e051465ef7ef611bcf6cb83d4dd85483417276f'/>
<id>5e051465ef7ef611bcf6cb83d4dd85483417276f</id>
<content type='text'>
commit c43f1508686e8e4746012bf87995085eeb0f5307 upstream.

Currently, executing suspend/hibernation,
memory access violation occurs.

In pch_dma_save_regs() called by suspend(),
you can see the following code.

static void pch_dma_save_regs(struct pch_dma *pd)
{
snip...
        list_for_each_entry_safe(chan, _c, &amp;pd-&gt;dma.channels, device_node) {
                pd_chan = to_pd_chan(chan);

                pd-&gt;ch_regs[i].dev_addr = channel_readl(pd_chan, DEV_ADDR);
                pd-&gt;ch_regs[i].mem_addr = channel_readl(pd_chan, MEM_ADDR);
                pd-&gt;ch_regs[i].size = channel_readl(pd_chan, SIZE);
                pd-&gt;ch_regs[i].next = channel_readl(pd_chan, NEXT);

                i++;
        }
}

Max loop count is 12 defined at pci_table.
So, this caused memory access violation.

This patch fixes the issue
 - Modify array size (MAX_CHAN_NR)

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c43f1508686e8e4746012bf87995085eeb0f5307 upstream.

Currently, executing suspend/hibernation,
memory access violation occurs.

In pch_dma_save_regs() called by suspend(),
you can see the following code.

static void pch_dma_save_regs(struct pch_dma *pd)
{
snip...
        list_for_each_entry_safe(chan, _c, &amp;pd-&gt;dma.channels, device_node) {
                pd_chan = to_pd_chan(chan);

                pd-&gt;ch_regs[i].dev_addr = channel_readl(pd_chan, DEV_ADDR);
                pd-&gt;ch_regs[i].mem_addr = channel_readl(pd_chan, MEM_ADDR);
                pd-&gt;ch_regs[i].size = channel_readl(pd_chan, SIZE);
                pd-&gt;ch_regs[i].next = channel_readl(pd_chan, NEXT);

                i++;
        }
}

Max loop count is 12 defined at pci_table.
So, this caused memory access violation.

This patch fixes the issue
 - Modify array size (MAX_CHAN_NR)

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_dma: Fix CTL register access issue</title>
<updated>2012-04-22T23:21:44+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.okisemi.com</email>
</author>
<published>2011-07-14T00:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9f52d613590b10630ab8bb222ae05c551389425'/>
<id>c9f52d613590b10630ab8bb222ae05c551389425</id>
<content type='text'>
commit 0b052f4a088ddc47a5da23dd733522241314cfb4 upstream.

Currently, Mode-Control register is accessed by read-modify-write.

According to DMA hardware specifications datasheet, prohibits this method.
Because this register resets to 0 by DMA HW after DMA transfer completes.
Thus, current read-modify-write processing can cause unexpected behavior.

The datasheet says in case of writing Mode-Control register, set the value for only target channel, the others must set '11b'.
e.g. Set DMA0=01b  DMA11=10b
CTL0=33333331h
CTL2=00002333h

NOTE:
CTL0 includes DMA0~7 Mode-Control register.
CTL2 includes DMA8~11 Mode-Control register.

This patch modifies the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0b052f4a088ddc47a5da23dd733522241314cfb4 upstream.

Currently, Mode-Control register is accessed by read-modify-write.

According to DMA hardware specifications datasheet, prohibits this method.
Because this register resets to 0 by DMA HW after DMA transfer completes.
Thus, current read-modify-write processing can cause unexpected behavior.

The datasheet says in case of writing Mode-Control register, set the value for only target channel, the others must set '11b'.
e.g. Set DMA0=01b  DMA11=10b
CTL0=33333331h
CTL2=00002333h

NOTE:
CTL0 includes DMA0~7 Mode-Control register.
CTL2 includes DMA8~11 Mode-Control register.

This patch modifies the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_dma: Fix channel locking</title>
<updated>2012-04-22T23:21:44+00:00</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2011-06-22T15:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=724d7ad550fb6ed11ce40425eb0206f90faf665a'/>
<id>724d7ad550fb6ed11ce40425eb0206f90faf665a</id>
<content type='text'>
commit 70f18915846f092e0e1c988f1726a532fa3ab3a1 upstream.

Fix for the following INFO message

=================================
[ INFO: inconsistent lock state ]
2.6.39+ #89
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
rs232/822 [HC1[1]:SC0[0]:HE0:SE1] takes:
 (&amp;(&amp;pd_chan-&gt;lock)-&gt;rlock){?.....}, at: [&lt;c123b9a1&gt;] pdc_desc_get+0x16/0xab
{HARDIRQ-ON-W} state was registered at:
  [&lt;c104fe28&gt;] mark_irqflags+0xbd/0x11a
  [&lt;c1050386&gt;] __lock_acquire+0x501/0x6bb
  [&lt;c1050945&gt;] lock_acquire+0x63/0x7b
  [&lt;c131c51d&gt;] _raw_spin_lock_bh+0x43/0x51
  [&lt;c123bee4&gt;] pd_alloc_chan_resources+0x92/0x11e
  [&lt;c123ad62&gt;] dma_chan_get+0x9b/0x107
  [&lt;c123b2d1&gt;] __dma_request_channel+0x61/0xdc
  [&lt;c11ba24b&gt;] pch_request_dma+0x61/0x19e
  [&lt;c11bb3b8&gt;] pch_uart_startup+0x16a/0x1a2
  [&lt;c11b8446&gt;] uart_startup+0x87/0x147
  [&lt;c11b9183&gt;] uart_open+0x117/0x13e
  [&lt;c11a5c7d&gt;] tty_open+0x23c/0x34c
  [&lt;c1097705&gt;] chrdev_open+0x140/0x15f
  [&lt;c10930a6&gt;] __dentry_open.clone.14+0x14a/0x22b
  [&lt;c1093dfb&gt;] nameidata_to_filp+0x36/0x40
  [&lt;c109f28b&gt;] do_last+0x513/0x635
  [&lt;c109f4af&gt;] path_openat+0x9c/0x2aa
  [&lt;c109f6e4&gt;] do_filp_open+0x27/0x69
  [&lt;c1093f02&gt;] do_sys_open+0xfd/0x184
  [&lt;c1093fad&gt;] sys_open+0x24/0x2a
  [&lt;c131d58c&gt;] sysenter_do_call+0x12/0x32
irq event stamp: 2522
hardirqs last  enabled at (2521): [&lt;c131ca3b&gt;] _raw_spin_unlock_irqrestore+0x36/0x52
hardirqs last disabled at (2522): [&lt;c131db27&gt;] common_interrupt+0x27/0x34
softirqs last  enabled at (2354): [&lt;c102fa11&gt;] __do_softirq+0x10a/0x11a
softirqs last disabled at (2299): [&lt;c10041a4&gt;] do_softirq+0x57/0xa4

other info that might help us debug this:
2 locks held by rs232/822:
 #0:  (&amp;tty-&gt;atomic_write_lock){+.+.+.}, at: [&lt;c11a4b7a&gt;] tty_write_lock+0x14/0x3c
 #1:  (&amp;port_lock_key){-.....}, at: [&lt;c11bad72&gt;] pch_uart_interrupt+0x17/0x1e9

stack backtrace:
Pid: 822, comm: rs232 Not tainted 2.6.39+ #89
Call Trace:
 [&lt;c1319f90&gt;] ? printk+0x19/0x1b
 [&lt;c104f893&gt;] print_usage_bug+0x184/0x18f
 [&lt;c104e5b1&gt;] ? print_irq_inversion_bug+0x10e/0x10e
 [&lt;c104f943&gt;] mark_lock_irq+0xa5/0x1f6
 [&lt;c104fc9c&gt;] mark_lock+0x208/0x2d7
 [&lt;c104fdc0&gt;] mark_irqflags+0x55/0x11a
 [&lt;c1050386&gt;] __lock_acquire+0x501/0x6bb
 [&lt;c10042ee&gt;] ? dump_trace+0x92/0xb6
 [&lt;c1050945&gt;] lock_acquire+0x63/0x7b
 [&lt;c123b9a1&gt;] ? pdc_desc_get+0x16/0xab
 [&lt;c131c2d0&gt;] _raw_spin_lock+0x3e/0x4c
 [&lt;c123b9a1&gt;] ? pdc_desc_get+0x16/0xab
 [&lt;c123b9a1&gt;] pdc_desc_get+0x16/0xab
 [&lt;c10504d8&gt;] ? __lock_acquire+0x653/0x6bb
 [&lt;c123bb2c&gt;] pd_prep_slave_sg+0x7c/0x1cb
 [&lt;c1006c3f&gt;] ? nommu_map_sg+0x6e/0x81
 [&lt;c11bace6&gt;] dma_handle_tx+0x2cf/0x344
 [&lt;c11bad72&gt;] ? pch_uart_interrupt+0x17/0x1e9
 [&lt;c11baebb&gt;] pch_uart_interrupt+0x160/0x1e9
 [&lt;c10642fb&gt;] handle_irq_event_percpu+0x25/0x127
 [&lt;c1064429&gt;] handle_irq_event+0x2c/0x43
 [&lt;c1065e0d&gt;] ? handle_fasteoi_irq+0x84/0x84
 [&lt;c1065eb9&gt;] handle_edge_irq+0xac/0xce
 &lt;IRQ&gt;  [&lt;c1003ecb&gt;] ? do_IRQ+0x38/0x9d
 [&lt;c131db2e&gt;] ? common_interrupt+0x2e/0x34
 [&lt;c105007b&gt;] ? __lock_acquire+0x1f6/0x6bb
 [&lt;c131ca3d&gt;] ? _raw_spin_unlock_irqrestore+0x38/0x52
 [&lt;c11b798b&gt;] ? uart_start+0x2d/0x32
 [&lt;c11b7998&gt;] ? uart_flush_chars+0x8/0xa
 [&lt;c11a7962&gt;] ? n_tty_write+0x12c/0x1c6
 [&lt;c1027a73&gt;] ? try_to_wake_up+0x251/0x251
 [&lt;c11a4d0b&gt;] ? tty_write+0x169/0x1dc
 [&lt;c11a7836&gt;] ? n_tty_ioctl+0xb7/0xb7
 [&lt;c1094841&gt;] ? vfs_write+0x91/0x10d
 [&lt;c11a4ba2&gt;] ? tty_write_lock+0x3c/0x3c
 [&lt;c1094a69&gt;] ? sys_write+0x3e/0x63
 [&lt;c131d58c&gt;] ? sysenter_do_call+0x12/0x32

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Tested-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 70f18915846f092e0e1c988f1726a532fa3ab3a1 upstream.

Fix for the following INFO message

=================================
[ INFO: inconsistent lock state ]
2.6.39+ #89
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
rs232/822 [HC1[1]:SC0[0]:HE0:SE1] takes:
 (&amp;(&amp;pd_chan-&gt;lock)-&gt;rlock){?.....}, at: [&lt;c123b9a1&gt;] pdc_desc_get+0x16/0xab
{HARDIRQ-ON-W} state was registered at:
  [&lt;c104fe28&gt;] mark_irqflags+0xbd/0x11a
  [&lt;c1050386&gt;] __lock_acquire+0x501/0x6bb
  [&lt;c1050945&gt;] lock_acquire+0x63/0x7b
  [&lt;c131c51d&gt;] _raw_spin_lock_bh+0x43/0x51
  [&lt;c123bee4&gt;] pd_alloc_chan_resources+0x92/0x11e
  [&lt;c123ad62&gt;] dma_chan_get+0x9b/0x107
  [&lt;c123b2d1&gt;] __dma_request_channel+0x61/0xdc
  [&lt;c11ba24b&gt;] pch_request_dma+0x61/0x19e
  [&lt;c11bb3b8&gt;] pch_uart_startup+0x16a/0x1a2
  [&lt;c11b8446&gt;] uart_startup+0x87/0x147
  [&lt;c11b9183&gt;] uart_open+0x117/0x13e
  [&lt;c11a5c7d&gt;] tty_open+0x23c/0x34c
  [&lt;c1097705&gt;] chrdev_open+0x140/0x15f
  [&lt;c10930a6&gt;] __dentry_open.clone.14+0x14a/0x22b
  [&lt;c1093dfb&gt;] nameidata_to_filp+0x36/0x40
  [&lt;c109f28b&gt;] do_last+0x513/0x635
  [&lt;c109f4af&gt;] path_openat+0x9c/0x2aa
  [&lt;c109f6e4&gt;] do_filp_open+0x27/0x69
  [&lt;c1093f02&gt;] do_sys_open+0xfd/0x184
  [&lt;c1093fad&gt;] sys_open+0x24/0x2a
  [&lt;c131d58c&gt;] sysenter_do_call+0x12/0x32
irq event stamp: 2522
hardirqs last  enabled at (2521): [&lt;c131ca3b&gt;] _raw_spin_unlock_irqrestore+0x36/0x52
hardirqs last disabled at (2522): [&lt;c131db27&gt;] common_interrupt+0x27/0x34
softirqs last  enabled at (2354): [&lt;c102fa11&gt;] __do_softirq+0x10a/0x11a
softirqs last disabled at (2299): [&lt;c10041a4&gt;] do_softirq+0x57/0xa4

other info that might help us debug this:
2 locks held by rs232/822:
 #0:  (&amp;tty-&gt;atomic_write_lock){+.+.+.}, at: [&lt;c11a4b7a&gt;] tty_write_lock+0x14/0x3c
 #1:  (&amp;port_lock_key){-.....}, at: [&lt;c11bad72&gt;] pch_uart_interrupt+0x17/0x1e9

stack backtrace:
Pid: 822, comm: rs232 Not tainted 2.6.39+ #89
Call Trace:
 [&lt;c1319f90&gt;] ? printk+0x19/0x1b
 [&lt;c104f893&gt;] print_usage_bug+0x184/0x18f
 [&lt;c104e5b1&gt;] ? print_irq_inversion_bug+0x10e/0x10e
 [&lt;c104f943&gt;] mark_lock_irq+0xa5/0x1f6
 [&lt;c104fc9c&gt;] mark_lock+0x208/0x2d7
 [&lt;c104fdc0&gt;] mark_irqflags+0x55/0x11a
 [&lt;c1050386&gt;] __lock_acquire+0x501/0x6bb
 [&lt;c10042ee&gt;] ? dump_trace+0x92/0xb6
 [&lt;c1050945&gt;] lock_acquire+0x63/0x7b
 [&lt;c123b9a1&gt;] ? pdc_desc_get+0x16/0xab
 [&lt;c131c2d0&gt;] _raw_spin_lock+0x3e/0x4c
 [&lt;c123b9a1&gt;] ? pdc_desc_get+0x16/0xab
 [&lt;c123b9a1&gt;] pdc_desc_get+0x16/0xab
 [&lt;c10504d8&gt;] ? __lock_acquire+0x653/0x6bb
 [&lt;c123bb2c&gt;] pd_prep_slave_sg+0x7c/0x1cb
 [&lt;c1006c3f&gt;] ? nommu_map_sg+0x6e/0x81
 [&lt;c11bace6&gt;] dma_handle_tx+0x2cf/0x344
 [&lt;c11bad72&gt;] ? pch_uart_interrupt+0x17/0x1e9
 [&lt;c11baebb&gt;] pch_uart_interrupt+0x160/0x1e9
 [&lt;c10642fb&gt;] handle_irq_event_percpu+0x25/0x127
 [&lt;c1064429&gt;] handle_irq_event+0x2c/0x43
 [&lt;c1065e0d&gt;] ? handle_fasteoi_irq+0x84/0x84
 [&lt;c1065eb9&gt;] handle_edge_irq+0xac/0xce
 &lt;IRQ&gt;  [&lt;c1003ecb&gt;] ? do_IRQ+0x38/0x9d
 [&lt;c131db2e&gt;] ? common_interrupt+0x2e/0x34
 [&lt;c105007b&gt;] ? __lock_acquire+0x1f6/0x6bb
 [&lt;c131ca3d&gt;] ? _raw_spin_unlock_irqrestore+0x38/0x52
 [&lt;c11b798b&gt;] ? uart_start+0x2d/0x32
 [&lt;c11b7998&gt;] ? uart_flush_chars+0x8/0xa
 [&lt;c11a7962&gt;] ? n_tty_write+0x12c/0x1c6
 [&lt;c1027a73&gt;] ? try_to_wake_up+0x251/0x251
 [&lt;c11a4d0b&gt;] ? tty_write+0x169/0x1dc
 [&lt;c11a7836&gt;] ? n_tty_ioctl+0xb7/0xb7
 [&lt;c1094841&gt;] ? vfs_write+0x91/0x10d
 [&lt;c11a4ba2&gt;] ? tty_write_lock+0x3c/0x3c
 [&lt;c1094a69&gt;] ? sys_write+0x3e/0x63
 [&lt;c131d58c&gt;] ? sysenter_do_call+0x12/0x32

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Tested-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_dma: fix DMA issue(ch8-ch11)</title>
<updated>2012-04-22T23:21:44+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.okisemi.com</email>
</author>
<published>2011-05-31T01:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e65f3a58ad648c5b33c97ef5861b590d0dd8f74c'/>
<id>e65f3a58ad648c5b33c97ef5861b590d0dd8f74c</id>
<content type='text'>
commit c3d4913cd4cd469cbf29d411293e937729e83f3a upstream.

ISSUE: In case PCH_DMA with I2S communications with ch8~ch11, sometimes I2S data
is not send correctly.
CAUSE: The following patch I submitted before was not enough modification for
supporting DMA ch8~ch11. The modification for status register of ch8~11 was not
enough.

pch_dma: Support I2S for ML7213 IOH
author	Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
	Mon, 9 May 2011 07:09:38 +0000 (16:09 +0900)
committer	Vinod Koul &lt;vinod.koul@intel.com&gt;
	Mon, 9 May 2011 11:42:23 +0000 (16:42 +0530)
commit	194f5f2706c7472f9c6bb2d17fa788993606581f
tree	c9d4903ea02b18939a4f390956a48be1a3734517
parent	60092d0bde4c8741198da4a69b693d3709385bf1

This patch fixes the issue.
We can confirm PCH_DMA with I2S communications with ch8~ch11 works well.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c3d4913cd4cd469cbf29d411293e937729e83f3a upstream.

ISSUE: In case PCH_DMA with I2S communications with ch8~ch11, sometimes I2S data
is not send correctly.
CAUSE: The following patch I submitted before was not enough modification for
supporting DMA ch8~ch11. The modification for status register of ch8~11 was not
enough.

pch_dma: Support I2S for ML7213 IOH
author	Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
	Mon, 9 May 2011 07:09:38 +0000 (16:09 +0900)
committer	Vinod Koul &lt;vinod.koul@intel.com&gt;
	Mon, 9 May 2011 11:42:23 +0000 (16:42 +0530)
commit	194f5f2706c7472f9c6bb2d17fa788993606581f
tree	c9d4903ea02b18939a4f390956a48be1a3734517
parent	60092d0bde4c8741198da4a69b693d3709385bf1

This patch fixes the issue.
We can confirm PCH_DMA with I2S communications with ch8~ch11 works well.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.okisemi.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
