dma_port_flash_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dma_port_flash_write(9) β€” the Kernel API Manual glow-up

okay so bestie, welcome to the dma_port_flash_write(9) page, straight out of the Kernel API Manual ✨ this one is short, sweet, and honestly kind of iconic β€” it's the "write stuff into the flash area that nobody's using right now" function. let's get into it πŸŽ€


🌸 NAME 🌸

dma_port_flash_write β€” literally just write to the non-active flash region, no cap πŸ’–

✨ SYNOPSIS ✨

int dma_port_flash_write (struct tb_dma_port *dma , unsigned int address
, const void *buf , size_t size );

yes queen, it returns an int. we love a return type with opinions 🫢

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dma β€” the DMA control port. your main character struct, struct tb_dma_port * and all πŸ’…
  • address β€” the address relative to the start of the non-active region. not absolute, bestie, keep that in mind πŸ™ˆ
  • buf β€” the data you're writing. the payload. the moment. const void * because we're not about to go mutating your stuff 🌸
  • size β€” size of the buffer. how much of buf is actually doing something πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe check: this function writes a block of data to the non-active flash region of the switch. that's the whole thing, fr fr πŸ“

and then there's the little plot twist ✨ β€” if the address is given as DMA_PORT_CSS_ADDRESS, the block is written using the CSS command instead. it's giving "same function, different pathway." iykyk πŸ’€

⭐ RETURN ⭐

  • 0 on success β€” slay, we ate πŸ‘‘
  • negative errno otherwise β€” not slay, but at least it's informative 😭

🌈 SEE ALSO 🌈

go read these next, bestie, they're all in the kernel file ./drivers/thunderbolt/dma_port.c:


aaaand that's the page πŸ’– cute little sign-off for you: this lore lives in ./drivers/thunderbolt, dated October 2026 β€” so go forth, write to that non-active flash region, and remember: the active region is not your business today πŸ§šβ€β™€οΈβœ¨πŸ«Ά

πŸ“¦ where this page comes from