]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: mdc: Correct terminate_all handling
authorDamien.Horsley <Damien.Horsley@imgtec.com>
Thu, 10 Dec 2015 15:07:23 +0000 (15:07 +0000)
committerVinod Koul <vinod.koul@intel.com>
Fri, 18 Dec 2015 05:42:29 +0000 (11:12 +0530)
commitb905e0ff018ec80b593eb3dfe172e0ca17c49323
tree9f44db2ab2fd46006f971b7c88a13cdbd24e7227
parentb987a85779eadf21cfe20ed5eb72e629883023fd
dmaengine: mdc: Correct terminate_all handling

Use of the CANCEL bit in mdc_terminate_all creates an
additional 'command done' to appear in the registers (in
addition to an interrupt).

In addition, there is a potential race between
mdc_terminate_all and the irq handler if a transfer
completes at the same time as the terminate all (presently
this results in an inappropriate warning).

To handle these issues, any outstanding 'command done'
events are cleared during mdc_terminate_all and the irq
handler takes no action when there are no new 'command done'
events.

Signed-off-by: Damien.Horsley <Damien.Horsley@imgtec.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/img-mdc-dma.c