mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
dmaengine: virt-dma: vchan_find_desc()
Add a function to find a descriptor within the depths of the virtualized DMA channel support. Needed for tx_status functionality. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -39,6 +39,19 @@ dma_cookie_t vchan_tx_submit(struct dma_async_tx_descriptor *tx)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vchan_tx_submit);
|
||||
|
||||
struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *vc,
|
||||
dma_cookie_t cookie)
|
||||
{
|
||||
struct virt_dma_desc *vd;
|
||||
|
||||
list_for_each_entry(vd, &vc->desc_issued, node)
|
||||
if (vd->tx.cookie == cookie)
|
||||
return vd;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vchan_find_desc);
|
||||
|
||||
/*
|
||||
* This tasklet handles the completion of a DMA descriptor by
|
||||
* calling its callback and freeing it.
|
||||
|
||||
Reference in New Issue
Block a user