usb4_switch_read_uid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… usb4_switch_read_uid β€” the kernel API manual, bestie edition ✨

okay so this is a page from the Kernel API Manual, and it's about usb4_switch_read_uid β€” literally the tiniest little function and yet she has the whole friend group in SEE ALSO. we love a social butterfly πŸ¦‹


🌸 NAME 🌸

usb4_switch_read_uid β€” reads the UID from a USB4 router, no cap πŸ’–


✨ SYNOPSIS ✨

int usb4_switch_read_uid (struct tb_switch *sw , u64 *uid );

that's it. that's the whole vibe. two args, one int coming back at you πŸŽ€


🫢 ARGUMENTS 🫢

  • sw β€” the USB4 router in question πŸ‘‘ this is the one you're reading from
  • uid β€” the UID gets stored here πŸ“ like, you hand her a pointer and she fills it in, that's the whole deal

πŸ’œ DESCRIPTION πŸ’œ

Reads the 64-bit UID from USB4 router config space. that's the tea β˜• β€” config space, 64 whole bits of UID, straight off the router. she's not doing anything fancy, she's just fetching the goods and dropping them where you told her to 🌈


⭐ RETURN ⭐

  • 0 on success β€” slay πŸ’…
  • negative errno otherwise β€” not slay 😭

🧚 SEE ALSO 🧚

okay bestie, buckle up, because this list is long β€” she knows everyone. the kernel file lives at ./drivers/thunderbolt/usb4.c, and here's the whole squad:

like I said. everyone. πŸ”₯


ngl, if you're poking at USB4 router config space you're already kind of a main character πŸŽ€

and that's the whole page, bestie!! this one comes out of ./drivers/thunderbolt, dated October 2026, and it's part of the Kernel API Manual β€” usb4_switch_read_uid(9) fr fr πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from