xdma_prep_device_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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