xgbe_wait_f..._tx_complete(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xgbe_wait_f..._tx_complete(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, and yes, we're reading a real kernel page together, this is our main character era fr fr πŸŽ€


✨ NAME ✨

xgbe_wait_for_dma_tx_complete β€” the little function whose whole job is to wait for DMA to finish up all the pending TX, no cap 🫢


🌸 SYNOPSIS 🌸

int xgbe_wait_for_dma_tx_complete (struct xgbe_prv_data *pdata );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdata β€” the driver's private data. that's it, that's the whole flex. it's the driver's own lil stash of private info and we just hand it over πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

so here's the vibe: this function waits for the DMA TX channels to complete all their pending descriptors. literally all of them. the whole point is it ensures no frames are in-flight before we go disable the transmitter β€” like, we're not about to yank the plug while packets are still mid-send, that would be a mess 😭

and here's the cute little shortcut: if the link is down, return immediately, because TX will never complete. no point sitting there waiting for something that's literally never gonna happen. king behavior honestly πŸ‘‘


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -ETIMEDOUT on timeout πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/net/ethernet/amd/xgbe/xgbe-dev.c β€” go read it, iykyk 🧚


and that's the whole page! this gem lives in ./drivers/net/ethernet/amd/xgbe, dated October 2026, and it's brought to you by the Kernel API Manual β€” mwah, go forth and wait on your DMA responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from