dma_port_flash_write(9)
π 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 ofbufis 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 β
0on 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:
struct tb_dma_port(9)dma_port_alloc(9)dma_port_free(9)dma_port_flash_read(9)dma_port_flash_update_auth(9)dma_port_flash_update_auth_status(9)dma_port_power_cycle(9)
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
- 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