shdma_add_desc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

shdma_add_desc(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual corner of the group chat β€” this page is all about shdma_add_desc, and we're gonna get, set up and return one transfer descriptor together ✨ no cap.


🌸 NAME 🌸

shdma_add_desc β€” get, set up and return one transfer descriptor πŸ’–

✨ SYNOPSIS ✨

struct shdma_desc * shdma_add_desc (struct shdma_chan *schan , unsigned long flags , dma_addr_t *dst , dma_addr_t *src , size_t *len , struct shdma_desc **first , enum dma_transfer_direction direction );

🫢 ARGUMENTS 🫢

vibe check on the arguments, bestie β€” every one matters:

  • schan β€” the DMA channel, main character energy πŸŽ€
  • flags β€” DMA transfer flags, iconic little switches ✨
  • dst β€” destination DMA address; it gets incremented when direction equals DMA_DEV_TO_MEM or DMA_MEM_TO_MEM πŸ”₯
  • src β€” source DMA address; it gets incremented when direction equals DMA_MEM_TO_DEV or DMA_MEM_TO_MEM πŸ’«
  • len β€” DMA transfer length, literally the length πŸ’…
  • first β€” if it's NULL, it gets set to the current descriptor and the cookie gets set to -EBUSY 😭
  • direction β€” needed for slave DMA to decide which address to keep constant; it equals DMA_MEM_TO_MEM for MEMCPY 🌈

Also, for the record: Returns 0 or an error. Locks: called with desc_lock held β€” respect the lock, bestie, no cap πŸ’….

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file β€” ./drivers/dma/sh/shdma-base.c 🧚

mwah πŸ’‹ β€” source/version: ./drivers/dma/sh; date: October 2026. that's the whole page, bestie, periodt πŸŽ€

πŸ“¦ where this page comes from