mptsas_find..._sas_address(9)
π« 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 toMPT_ADAPTERstructure. 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:
mptsas_add_device_component(9)mptsas_add_device_component_by_fw(9)mptsas_add_device_component_starget_ir(9)mptsas_add_device_component_starget(9)mptsas_del_device_component_by_os(9)mptsas_del_device_components(9)mptsas_find_vtarget(9)mptsas_target_reset(9)mptsas_target_reset_queue(9)mptsas_schedule_target_reset(9)mptsas_taskmgmt_complete(9)mptsas_ioc_reset(9)enum device_state(9)mptsas_add_end_device(9)mptsas_del_end_device(9)mptsas_firmware_event_work(9)mptsas_eh_timed_out(9)mptsas_exp_repmanufacture_info(9)mptsas_delete_expander_siblings(9)mptsas_expander_delete(9)mptsas_send_expander_event(9)mptsas_expander_add(9)mptsas_probe_expanders(9)mptsas_scan_sas_topology(9)mptsas_find_phyinfo_by_phys_disk_num(9)mptsas_issue_tm(9)mptsas_broadcast_primitive_work(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms