• Yuri Tikhonov's avatar
    dmaengine: fix dependency chaining · dd59b853
    Yuri Tikhonov authored
    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: default avatarYuri Tikhonov <yur@emcraft.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    dd59b853
dmaengine.c 26.5 KB