xdma_prep_device_sg(9)
π xdma_prep_device_sg(9) β from the Kernel API Manual, bestie π«Ά
β¨ NAME β¨
xdma_prep_device_sg β okay so this is the one that prepares a descriptor for a DMA transaction. That's the whole vibe. It sets the descriptor up. It does not send it. We're prepping, not performing. π
π SYNOPSIS π
struct dma_async_tx_descriptor * xdma_prep_device_sg (struct dma_chan
*chan , struct scatterlist *sgl , unsigned int sg_len , enum
dma_transfer_direction dir , unsigned long flags , void *context );
Like, look at her. Six arguments, one return value, zero notes. She's booked and busy. β
πΈ ARGUMENTS πΈ
chanβ DMA channel pointer. Your channel. The main character of this whole operation, honestly. πsglβ Transfer scatter gather list. This is your list. It's scattered. It's gathered. It's giving range. πsg_lenβ Length of scatter gather list. Yes bestie, the list has a length, pls pass it correctly. πdirβ Transfer direction. Which way are the bytes going? That's it. That's the whole argument. π₯flagsβ transfer ack flags. The ack flags. For the transfer. Ngl the lowercase in the original is sending me but we keep it exactly as written. πcontextβ APP words of the descriptor. The APP words!! Of the descriptor!! They go in the context slot!! π¦
π SEE ALSO
The kernel file in question is ./drivers/dma/xilinx/xdma.c. That's the home base, the lore drop, the source of truth. π
Then there's a whole friend group of structs β go say hi to all of them:
struct xdma_desc_block(9)struct xdma_chan(9)struct xdma_desc(9)struct xdma_device(9)
And then the entire extended friend circle, no cap, we're listing all of them because nobody gets left behind in this group chat:
xdma_link_sg_desc_blocks(9)xdma_link_cyclic_desc_blocks(9)xdma_channel_init(9)xdma_free_desc(9)xdma_alloc_desc(9)xdma_xfer_start(9)xdma_xfer_stop(9)xdma_alloc_channels(9)xdma_issue_pending(9)xdma_terminate_all(9)xdma_synchronize(9)xdma_fill_descs(9)xdma_prep_dma_cyclic(9)xdma_prep_interleaved_dma(9)xdma_device_config(9)xdma_free_chan_resources(9)xdma_alloc_chan_resources(9)xdma_channel_isr(9)xdma_irq_fini(9)xdma_set_vector_reg(9)xdma_irq_init(9)xdma_disable_user_irq(9)xdma_enable_user_irq(9)xdma_get_user_irq(9)xdma_remove(9)xdma_probe(9)
Thirty entries. I counted. We're thorough in this house. π§
Real talk though β this page is genuinely just the prep step, so if you're wondering what happens after you prep a descriptor, that's not on this page. Go read the rest of the friend group above. iykyk π
<div align="center">β¨ so that's the whole page β¨</div>
And that's a wrap, bestie! This lil' slice of the Kernel API Manual lives over in ./drivers/dma/xilinx and the version vibe is dated October 2026 β so it's giving futuristic but also somehow already nostalgic. Periodt. π
π«ΆπΈ
π¦ 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