tb_next_port_on_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_next_port_on_path(9) β€” Kernel API Manual πŸ’…

okay so bestie, you’re in the Kernel API Manual, and the main character of this page is tb_next_port_on_path(9). she walks ports. she follows links. she has rules. let’s get into it πŸ’–


🌸 NAME 🌸

tb_next_port_on_path β€” Return next port for given port on a path


✨ SYNOPSIS ✨

struct tb_port * tb_next_port_on_path (struct tb_port *start , struct
tb_port *end , struct tb_port *prev );

πŸŽ€ ARGUMENTS πŸŽ€

  • start β€” Start port of the walk. the beginning of the journey, the origin story.
  • end β€” End port of the walk. the destination, the final boss.
  • prev β€” Previous port (NULL if this is the first). literally the β€œwhere was I?” pointer.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function can be used to walk from one port to another if they are connected through zero or more switches. yes, zero. yes, more. the switch count is not the vibe check here.

If the prev is dual link port, the function follows that link and returns another end on that same link. dual-link girlies stay winning πŸ”₯

⚠️ real talk, no cap: the domain tb->lock must be held when this function is called. not optional. lock it or don’t call it, bestie.

πŸ’« RETURN πŸ’«

Pointer to struct tb_port, NULL if the end port has been reached.


🌈 SEE ALSO 🌈

the home base is the kernel file ./drivers/thunderbolt/switch.c, and these are the linked icons β€” every single one, fr fr:


okay that’s the page, bestie! cute little footer sign-off: source/version ./drivers/thunderbolt, date October 2026, and the manual name is tb_next_port_on_path(9). mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from