mptsas_find..._sas_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« mptsas_find..._sas_address β€” Kernel API Manual, but make it make sense πŸ’«

okay so bestie. this is a page straight out of the Kernel API Manual and it's literally about going "hey, who owns this sas_address?" and getting the portinfo back. it's short, it's sweet, it's giving "i just need one lookup function" energy, and i'm gonna walk you through every crumb of it πŸ“


✨ NAME ✨

mptsas_find_portinfo_by_sas_address β€” finds and returns the portinfo for this sas_address. like a little lost-and-found desk for SAS addresses, no cap πŸŽ€


πŸ’… SYNOPSIS πŸ’…

struct mptsas_portinfo * mptsas_find_portinfo_by_sas_address
(MPT_ADAPTER *ioc , u64 sas_address );

that return type is a struct mptsas_portinfo *, bestie β€” a pointer. remember that for later, it's foreshadowing 😭


🌸 ARGUMENTS 🌸

  • ioc β€” Pointer to MPT_ADAPTER structure. that's your adapter handle, the whole reason we're here fr fr πŸ”₯
  • sas_address β€” expander sas address. this is the one you're hunting for πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

literally the whole description is one sentence and it's a rule, not a suggestion:

This function should be called with the sas_topology_mutex already held.

so like… do NOT just walk in here without holding the sas_topology_mutex first. that's the vibe check and you will fail it πŸ™ˆ handle the lock, then call the function. periodt.


🌈 RETURN 🌈

Returns NULL if not found. that's it, that's the documented non-happy path β€” if the address isn't a thing in there, you get a NULL back and you have to deal with it πŸ’€


⭐ SEE ALSO ⭐

okay this list is long long, but i refuse to skip a single one of them because every link deserves its moment πŸ’–

the kernel file it lives in:

  • ./drivers/message/fusion/mptsas.c

and the whole friend group:

that's 27 links and yes i counted, we're thorough in this group chat 🫢


mwah πŸ’‹ this page ships from ./drivers/message/fusion, dated October 2026. go hold that mutex, bestie β€” i believe in you πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from