STRUCT SHDMA_OPS(9)
β¨ struct shdma_ops(9) β¨
okay so this is from the Kernel API Manual and it's literally the whole vibe of "simple DMA driver operations" π like if you've ever wondered what a DMA driver has to bring to the group chat, it's this struct, and she does not come to play.
πΈ SYNOPSIS πΈ
bestie, here's the whole squad, character for character, no cap:
struct shdma_ops {
bool (*desc_completed)(struct shdma_chan *, struct shdma_desc *);
void (*halt_channel)(struct shdma_chan *);
bool (*channel_busy)(struct shdma_chan *);
dma_addr_t (*slave_addr)(struct shdma_chan *);
int (*desc_setup)(struct shdma_chan *, struct shdma_desc *,
dma_addr_t, dma_addr_t, size_t *);
int (*set_slave)(struct shdma_chan *, int, dma_addr_t, bool);
int (*setup_xfer)(struct shdma_chan *, int);
void (*start_xfer)(struct shdma_chan *, struct shdma_desc *);
struct shdma_desc *(*embedded_desc)(void *, int);
bool (*chan_irq)(struct shdma_chan *, int);
size_t (*get_partial)(struct shdma_chan *, struct shdma_desc *);
};
like yes, that's a lot of function pointers, but she's organized π
π¦ Members π¦
desc_completedβ returnstrueif this is the descriptor that just has completed. this one's atomic, so don't be weird about it πhalt_channelβ stop DMA channel operation. also atomic. she stops, she doesn't negotiate πchannel_busyβ returnstrueif the channel is busy. atomic, obviously, because asking "are you busy" while stuff is happening is the whole pointslave_addrβ returns the slave DMA address. no drama, just the address π«Άdesc_setupβ sets up the hardware specific descriptor portion. atomic! hardware-specific means hardware-specific, don't come for herset_slaveβ binds the channel to a slave. it's giving commitment β¨setup_xferβ configures the channel hardware for operation. atomic β‘start_xferβ starts the DMA transfer. atomic. and then she goes πββοΈπ¨embedded_descβ returns the Nthstruct shdma_descpointer from the descriptor array. Nth, bestie, count them properly π’chan_irqβ processes channel IRQ, returnstrueif a transfer has completed. atomic πget_partialβ wait, hold on π
ok so real talk, get_partial is listed in the members of the synopsis, but the original page gives her no one-liner description. so she's just standing there, iconic and mysterious, minding her own business. no invented facts, no cap π
π SEE ALSO π
- Kernel file
./include/linux/shdma-base.h - enum
shdma_pm_state(9)
π sign-off π
that's the whole page, bestie β sourced from ./include/linux, dated October 2026, filed under struct shdma_ops(9). go forth and slay your DMA ops πβ¨π¦
π¦ 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