]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: fix dependency chaining
authorYuri Tikhonov <yur@emcraft.com>
Mon, 12 Jan 2009 22:17:20 +0000 (15:17 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 12 Jan 2009 22:19:29 +0000 (15:19 -0700)
commit8ce8f1a4bfa06cc93936939abe721543ee2788a5
treea1236a8042583813fc7b9e32688b9bc6e7858ea0
parent44426b9f1bb8f879e31cb771c7683fec96f45827
dmaengine: fix dependency chaining

In dmaengine we track the dependencies between the descriptors
using the 'next' pointers of the structure. These pointers are
set to NULL as soon as the corresponding descriptor has been
submitted to the channel (in dma_run_dependencies()).

But, the first 'next' in chain is still remaining set, regardless
the fact, that tx->next has been already submitted. This may lead to
multiple submissions of the same descriptor. This patch fixes this.

Actually, some previous implementation of the xxx_run_dependencies()
function already had this fix in place. The fdb..0eaf3 commit, beside the
correct things, broke this.

Cc: <stable@kernel.org>
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/dmaengine.c