atc_prep_slave_sg(9)
π atc_prep_slave_sg(9) β your fave Kernel API Manual entry, bestie β¨
okay so picture this: it's the Kernel API Manual, and we're reading atc_prep_slave_sg(9) π no cap, this one is lowkey iconic and it's giving "behind the scenes of a DMA_SLAVE transaction." Let's get into it π«Ά
π NAME π
atc_prep_slave_sg β literally the function that prepares descriptors for a DMA_SLAVE transaction β¨ it's doing the prep work so the actual transfer can slay later, periodt π
π¦ SYNOPSIS π¦
bestie, here's the signature, exactly as it is, do not come for me about the spacing π
struct dma_async_tx_descriptor * atc_prep_slave_sg (struct dma_chan
*chan , struct scatterlist *sgl , unsigned int sg_len , enum
dma_transfer_direction direction , unsigned long flags , void *context
);
it hands you back a struct dma_async_tx_descriptor * and honestly? main character energy π₯
πΈ ARGUMENTS πΈ
six little besties walk into the function and here's what each one is about π§
chanβ the DMA channel π« that's your gal, the one actually doing the thingsglβ the scatterlist to transfer to/from π¦ like, the list of where the data's coming from or going to, whichever way the vibe flowssg_lenβ the number of entries in scatterlist β so basically how many things are in that list, count 'emdirectionβ the DMA direction π theenum dma_transfer_directionof it all, the way that it tells you which way we're movingflagsβ the tx descriptor status flags π all the little settings, the seasoning on the descriptorcontextβ the transaction context, and bestie please note: it's(ignored)π not me passing in context just for it to be ignored, we've all been there π
genuine heads-up from the original page: context is literally ignored. taking it, not using it. we respect the honesty π
π SEE ALSO π
okay this section is a whole friend group π and the original page says they all live in the kernel file ./drivers/dma/at_hdmac.c β go say hi π
struct atdma_sg(9)struct at_desc(9)enum atc_status(9)struct at_dma_chan(9)struct at_dma(9)atc_chan_is_enabled(9)atc_chan_is_paused(9)atc_chan_is_cyclic(9)set_lli_eol(9)struct at_dma_platform_data(9)struct at_dma_slave(9)atc_dostart(9)atc_calc_bytes_left(9)atc_get_llis_residue(9)atc_get_residue(9)atc_handle_error(9)atc_prep_dma_interleaved(9)atc_prep_dma_memcpy(9)atc_prep_dma_memset(9)atc_prep_dma_cyclic(9)atc_tx_status(9)atc_alloc_chan_resources(9)atc_free_chan_resources(9)at_dma_off(9)
twenty-four entries, every single one of them accounted for, iykyk π§ββοΈβ¨
and that's the whole page, bestie π«Ά come back anytime, the kernel lore is always here for you π
signed, sealed, delivered:./drivers/dma, October 2026,atc_prep_slave_sg(9)β mwah ππ
π¦ 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