find_cxl_port_by_uport(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_cxl_port_by_uport(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this is find_cxl_port_by_uport, and she's literally the friend who introduces you to the right port at the party πŸŽ€


✨ NAME ✨

find_cxl_port_by_uport β€” finds you a CXL port device companion</> 🫢 (yes, companion. it's giving matchmaker.)


🌸 SYNOPSIS 🌸

struct cxl_port * find_cxl_port_by_uport (struct device *uport_dev );

that's it. one arg. she's low maintenance πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • uport_dev β€” the device that acts as a switch</> or endpoint</> in the CXL hierarchy. like, that's her whole job description fr fr.

πŸ’– DESCRIPTION πŸ’–

so here's the tea πŸ“: in the case of endpoint ports, recall that port->uport_dev points to a 'struct cxl_memdev' device. so the uport_dev argument is the parent device of the

(yeah bestie the original sentence just trails off like that at "of the" β€” not me, i'm just reporting what the page says 😭)


and the actual mechanic, no cap: the function takes a device reference on the port device. which means β€” and this is the important part, do NOT skip it β€” the caller should do a put_device when done. 🫢

⚠️ for real though: reference held β†’ you owe a put_device. that's the contract. don't be that person who leaves a reference dangling, it's not cute πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/cxl/core/port.c

then the whole squad, in order πŸ‘‘


and that's the whole page, bestie!! 🧚✨ this iconic little number lives in ./drivers/cxl/core, dated October 2026, and it's filed under find_cxl_port_by_uport(9) β€” go forth and put_device, ily, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from