static void mv_xor_tasklet(unsigned long data)
{
struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
- mv_xor_slot_cleanup(chan);
+
+ spin_lock_bh(&chan->lock);
+ __mv_xor_slot_cleanup(chan);
+ spin_unlock_bh(&chan->lock);
}
static struct mv_xor_desc_slot *
struct mv_xor_desc_slot *iter, *_iter;
int in_use_descs = 0;
- mv_xor_slot_cleanup(mv_chan);
-
spin_lock_bh(&mv_chan->lock);
+
+ __mv_xor_slot_cleanup(mv_chan);
+
list_for_each_entry_safe(iter, _iter, &mv_chan->chain,
chain_node) {
in_use_descs++;
ret = dma_cookie_status(chan, cookie, txstate);
if (ret == DMA_COMPLETE)
return ret;
- mv_xor_slot_cleanup(mv_chan);
+
+ spin_lock_bh(&mv_chan->lock);
+ __mv_xor_slot_cleanup(mv_chan);
+ spin_unlock_bh(&mv_chan->lock);
return dma_cookie_status(chan, cookie, txstate);
}