On Wed, 30 Jan 2008 10:39:47 -0700 "Dan Williams" <dan.j.williams@intel.com> wrote:I have to say I'm not crazy about the idea of adding more callbacks to the descriptor... The client must somehow know when the transfer is complete -- after all, it has to call async_tx_ack() at some point. So additional callbacks shouldn't be needed. How about adding more variants of the "ack" function -- one for each kind of transfer? For example, after an async_memcpy() transaction is complete, the client must call async_memcpy_ack(), which could be an inline function containing something along the lines of static inline void async_memcpy_ack(struct dma_async_tx_descriptor *tx) { struct dma_device *dma = tx->chan->device; dma_unmap_page(dma->dev, tx->src_phys, tx->len, DMA_TO_DEVICE); dma_unmap_page(dma->dev, tx->dst_phys, tx->len, DMA_FROM_DEVICE); async_tx_ack(tx); } which would evaluate to just async_tx_ack(tx) in most cases, since dma_unmap_page() usually doesn't actually do anything. This requires three additional fields in the dma_async_tx_descriptor structure, but in many cases the driver needs these fields in its own private descriptor wrapper anyway. Haavard --
| Andrew Morton | Re: Linux 2.6.21-rc4 |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Balbir Singh | Re: [RFC][PATCH 2/7] RSS controller core |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Andreas Henriksson | [PATCH 06/12] Remove bogus reference to tc-filters(8) from tc(8) manpage. |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
