dma_port_alloc(9)
π dma_port_alloc(9) β like, the whole lore
okay so real talk, this is a page straight out of the Kernel API Manual, and it's about finding a DMA control port on a Thunderbolt switch. strap in bestie, it's actually short and sweet π
β¨ NAME β¨
dma_port_alloc β finds the DMA control port from a switch that's pointed at by a route π―
π¦ SYNOPSIS π¦
struct tb_dma_port * dma_port_alloc (struct tb_switch *sw );
π ARGUMENTS π
swβ the switch, like, from where you're finding the DMA port. that's the whole vibe. this is the thing you hand over so it knows where to look π
π DESCRIPTION π
so what this does: the function checks whether the switch's NHI port supports the DMA configuration mailbox capability β a whole vibe check on the hardware, basically β and if it does support it, it allocates and initializes the DMA port structure. slay π
if that capability wasn't found? you get NULL. no port for you, bestie π
and here's the iconic part: the DMA control port is still functional when the switch is in safe mode. yes, even in safe mode. main character energy fr fr π
πΈ RETURN πΈ
struct tb_dma_port on success β¨ β NULL otherwise π
π SEE ALSO π
- the kernel file
./drivers/thunderbolt/dma_port.c struct tb_dma_port(9)dma_port_free(9)dma_port_flash_read(9)dma_port_flash_write(9)dma_port_flash_update_auth(9)dma_port_flash_update_auth_status(9)dma_port_power_cycle(9)
go read those too, iykyk π«Ά
kay that's the whole page, no cap π§ from ./drivers/thunderbolt, dated October 2026, and it's the dma_port_alloc(9) page in the Kernel API Manual β mwah, hope that ate π
π¦ 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