aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-11 03:20:39 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-11 03:20:39 -0500
commit649274d993212e7c23c0cb734572c2311c200872 (patch)
tree84ff8e44e5b44bbe3c388eded5c3e28bf0bd2375 /include
parent47fd23fe8efeea3af4593a8424419df48724eb25 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmaengine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 64dea2ab326c..c73f1e2b59b7 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -270,8 +270,18 @@ struct dma_device {
270 270
271/* --- public DMA engine API --- */ 271/* --- public DMA engine API --- */
272 272
273#ifdef CONFIG_DMA_ENGINE
273void dmaengine_get(void); 274void dmaengine_get(void);
274void dmaengine_put(void); 275void dmaengine_put(void);
276#else
277static inline void dmaengine_get(void)
278{
279}
280static inline void dmaengine_put(void)
281{
282}
283#endif
284
275dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, 285dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
276 void *dest, void *src, size_t len); 286 void *dest, void *src, size_t len);
277dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, 287dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,