STRUCT DMA_ASYNC_TX_DESCRIPTOR(9)
β¨ struct dma_async_tx_descriptor(9) β¨
okay so this is from the Kernel API Manual bestie, and it's literally the blueprint for struct dma_async_tx_descriptor β the async transaction descriptor, aka the dma generic offload fields situation. iykyk π
π¦ NAME π¦
struct dma_async_tx_descriptor β async transaction descriptor ---dma generic offload fields---
π SYNOPSIS π
struct dma_async_tx_descriptor {
dma_cookie_t cookie;
enum dma_ctrl_flags flags;
dma_addr_t phys;
struct dma_chan *chan;
dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
int (*desc_free)(struct dma_async_tx_descriptor *tx);
dma_async_tx_callback callback;
dma_async_tx_callback_result callback_result;
void *callback_param;
struct dmaengine_unmap_data *unmap;
enum dma_desc_metadata_mode desc_metadata_mode;
const struct dma_descriptor_metadata_ops *metadata_ops;
#ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH;
struct dma_async_tx_descriptor *next;
struct dma_async_tx_descriptor *parent;
spinlock_t lock;
#endif;
};
πΈ Members πΈ
okay so first up we have the dma generic offload fields era of the struct β the core squad π«Ά
cookieβ the tracking cookie for this transaction, bestie πͺ and plot twist: it's set to-EBUSYif this tx is sitting on a dependency list. like it's literally occupied, leave her alone.flagsβ flags that augment operation preparation, control completion, and communicate status. the whole vibe-control department β¨physβ physical address of the descriptor. that's her real address, no catfishing πchanβ target channel for this operation. where the work actually gets sent πtx_submitβ accept the descriptor, assign an ordered cookie, and mark the descriptor pending. To be pushed on.issue_pendingcall. she's queued and ready, no cap π₯desc_freeβ the driver's callback function to free a resusable descriptor after completion. cleanup crew, iconic π§Ήcallbackβ routine to call after this operation is complete. the "we're so back" moment πcallback_resultβ error result from a DMA transaction. receipts, basically πcallback_paramβ general parameter to pass to the callback routine. lil extra to hand over πunmapβ hook for generic DMA unmap data. the un-hook, if you will πͺdesc_metadata_modeβ core managed metadata mode, and the whole point is to protect mixed use ofDESC_METADATA_CLIENTorDESC_METADATA_ENGINE. Otherwise it'sDESC_METADATA_NONE. pick a lane bestie πmetadata_opsβ DMA driver provided metadata mode ops, and these need to be set by the DMA driver if metadata mode is supported with the descriptor. no ops, no metadata party π
β async_tx api specific fields β
now the async_tx api specific fields section, the dependency-chain girlies π
nextβ at completion, submit this descriptor. the "and then??" energy βοΈparentβ pointer to the next level up in the dependency chain. mother is mothering πlockβ protect theparentandnextpointers. do not touch without the lock, i'm serious π«Ά
π SEE ALSO π
Kernel file ./include/linux/dmaengine.h β the source of truth, go read her π
dma_cookie_t(9)enum dma_status(9)enum dma_transaction_type(9)enum dma_transfer_direction(9)struct data_chunk(9)struct dma_interleaved_template(9)struct dma_vec(9)enum dma_ctrl_flags(9)enum sum_check_bits(9)enum sum_check_flags(9)enum dma_desc_metadata_mode(9)struct dma_chan_percpu(9)struct dma_router(9)struct dma_chan(9)struct dma_chan_dev(9)enum dma_slave_buswidth(9)struct dma_slave_config(9)enum dma_residue_granularity(9)struct dma_slave_caps(9)dma_filter_fn(9)struct dma_tx_state(9)enum dmaengine_alignment(9)struct dma_slave_map(9)struct dma_filter(9)struct dma_device(9)dmaengine_prep_peripheral_dma_vec(9)dmaengine_prep_config_sg_safe(9)dmaengine_prep_config_single_safe(9)dmaengine_prep_dma_memset(9)dmaengine_terminate_all(9)dmaengine_terminate_async(9)dmaengine_synchronize(9)dmaengine_terminate_sync(9)dma_async_issue_pending(9)dma_async_is_tx_complete(9)dma_async_is_complete(9)
and that's the whole page bestie, we ate and left no crumbs π β¨
πΈ signed, sealed, delivered from./include/linuxwith a date stamp ofOctober 2026βstruct dma_a...x_descriptor(9)forever and always ππ¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms