STRUCT DMA_CHAN(9)
π struct dma_chan(9) ππ
okay so bestie, this is literally the Kernel API Manual page for struct dma_chan(9) β and the whole vibe is βdevices supply DMA channels, clients use themβ β¨ no cap. Itβs a kernel struct, itβs iconic, and weβre gonna walk through every single member like itβs a group-chat roll call π«Ά
β¨ NAME β¨
struct dma_chan β devices supply DMA channels, and clients use them π periodt.
π SYNOPSIS π
struct dma_chan {
struct dma_device *device;
struct device *slave;
dma_cookie_t cookie;
dma_cookie_t completed_cookie;
spinlock_t lock;
int chan_id;
struct dma_chan_dev *dev;
const char *name;
#ifdef CONFIG_DEBUG_FS;
char *dbg_client_name;
#endif;
struct list_head device_node;
struct dma_chan_percpu __percpu *local;
int client_count;
int table_count;
struct dma_router *router;
void *route_data;
void *private;
};
πΈ Members πΈ
deviceβ ptr to the DMA device that supplies this channel, and it is always!NULLβ no cap, bestie πslaveβ ptr to the device using this channel π«Άcookieβ last cookie value returned to the client πͺcompleted_cookieβ last completed cookie for this channel βlockβ protects between config and prepare-transfer when the driver has not implemented thedevice_prep_config_sgcallback πchan_idβ channel ID for sysfs πdevβ class device for sysfs πnameβ backlink name for sysfs π·οΈdbg_client_nameβ slave name for debugfs, in the formatdev_name(requester's dev):channel name, for example:"2b00000.mcasp:tx"β this one lives under#ifdef CONFIG_DEBUG_FS;in the struct πdevice_nodeβ used to add this to the device chan list πlocalβ per-cpu pointer to astruct dma_chan_percpuβ‘client_countβ how many clients are using this channel π₯table_countβ number of appearances in the mem-to-mem allocation table πrouterβ pointer to the DMA router structure π°οΈroute_dataβ channel specific data for the router π§privateβ private data for certain client-channel associations π
π¦ SEE ALSO π¦
- Kernel file
./include/linux/dmaengine.hπ 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_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_async_tx_descriptor(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)
thatβs the whole page, bestie β source/version: ./include/linux, date: October 2026, signed: struct dma_chan(9) π slay and bye β¨
π¦ 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