mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net_dma: acquire/release dma channels on ifup/ifdown
The recent dmaengine rework removed the capability to remove dma device driver modules while net_dma is active. Rather than notify dmaengine-clients that channels are trying to be removed, we now rely on clients to notify dmaengine when they no longer have a need for channels. Teach net_dma to release channels by taking dmaengine references at netdevice open and dropping references at netdevice close. Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
47fd23fe8e
commit
649274d993
2 changed files with 20 additions and 3 deletions
|
@ -270,8 +270,18 @@ struct dma_device {
|
|||
|
||||
/* --- public DMA engine API --- */
|
||||
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
void dmaengine_get(void);
|
||||
void dmaengine_put(void);
|
||||
#else
|
||||
static inline void dmaengine_get(void)
|
||||
{
|
||||
}
|
||||
static inline void dmaengine_put(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
|
||||
void *dest, void *src, size_t len);
|
||||
dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue