mpi3mr_get_...d_by_sas_phy(9)
π mpi3mr_get_port_id_by_sas_phy β from the Kernel API Manual, section 9, bestie π
okay so this one is a little function from the mpi3mr driver family and she's honestly so straightforward β it's giving "short and sweet, knows exactly what she wants." It's mpi3mr_get_port_id_by_sas_phy, and (iykyk) that ... in the page title is just the terminal being dramatic and truncating things, don't worry about it π
β¨ NAME β¨
mpi3mr_get_port_id_by_sas_phy β literally just Get port ID of the given phy. that's the whole job. that's the assignment. π«Ά
πΈ SYNOPSIS πΈ
u8 mpi3mr_get_port_id_by_sas_phy (struct sas_phy *phy );
so she takes one pointer and she hands you back a u8. no sneaky extra args, no weird side quests. iconic behavior tbh π
π¦ ARGUMENTS π¦
phyβ a SAS transport layer phy object (struct sas_phy *). that's the thing you're asking about, and yes it's a real kernel struct, no cap π§
β RETURN β
You get the port number for a valid ID β¨ β else 0xFFFF. so if it can't find a legit ID, bestie comes back with 0xFFFF and that's your little sign that it didn't work out π not a 0, not a -1, 0xFFFF. memorise it, it's the vibe check of this whole function fr fr.
ngl the fact that the failure value is0xFFFFwhile the return type isu8is exactly the kind of thing you screenshot and send to the group chat π the manpage says what the manpage says, so I'm saying it too β0xFFFF.
π₯ SEE ALSO π₯
okay this is the part where the manpage goes absolutely feral and lists basically the entire mpi3mr transport crew. she said "let me introduce you to everyone" π and honestly? respect. here's the full roll call, nobody left behind:
- the source itself: Kernel file
./drivers/scsi/mpi3mr/mpi3mr_transport.c mpi3mr_post_transport_req(9),mpi3mr_report_manufacture(9)__mpi3mr_expander_find_by_handle(9),mpi3mr_is_expander_device(9)mpi3mr_get_sas_address(9)__mpi3mr_get_tgtdev_by_addr(9),mpi3mr_get_tgtdev_by_addr(9)mpi3mr_remove_device_by_sas_address(9),__mpi3mr_get_tgtdev_by_addr_and_rphy(9)mpi3mr_expander_find_by_sas_address(9),__mpi3mr_sas_node_find_by_sas_address(9)mpi3mr_parent_present(9),mpi3mr_convert_phy_link_rate(9)mpi3mr_delete_sas_phy(9),mpi3mr_add_sas_phy(9)mpi3mr_add_phy_to_an_existing_port(9),mpi3mr_delete_sas_port(9)mpi3mr_del_phy_from_an_existing_port(9),mpi3mr_sas_port_sanity_check(9)mpi3mr_set_identify(9),mpi3mr_add_host_phy(9),mpi3mr_add_expander_phy(9)mpi3mr_alloc_hba_port(9),mpi3mr_get_hba_port_by_id(9)mpi3mr_update_links(9),mpi3mr_sas_host_refresh(9),mpi3mr_sas_host_add(9)mpi3mr_sas_port_add(9),mpi3mr_sas_port_remove(9)struct host_port(9)π yes the struct gets her own entry, main character energympi3mr_update_mr_sas_port(9),mpi3mr_refresh_sas_ports(9),mpi3mr_refresh_expanders(9)mpi3mr_expander_node_add(9),mpi3mr_expander_add(9)mpi3mr_expander_node_remove(9),mpi3mr_expander_remove(9)mpi3mr_get_sas_negotiated_logical_linkrate(9)mpi3mr_report_tgtdev_to_sas_transport(9),mpi3mr_remove_tgtdev_from_sas_transport(9)mpi3mr_get_port_id_by_rphy(9)π the sibling of the function we're literally reading about, love that for hermpi3mr_get_expander_phy_error_log(9)mpi3mr_transport_get_linkerrors(9),mpi3mr_transport_get_enclosure_identifier(9),mpi3mr_transport_get_bay_identifier(9)mpi3mr_expander_phy_control(9)mpi3mr_transport_phy_reset(9),mpi3mr_transport_phy_enable(9),mpi3mr_transport_phy_speed(9)mpi3mr_map_smp_buffer(9),mpi3mr_unmap_smp_buffer(9),mpi3mr_transport_smp_handler(9)
likeβ¦ fifty-whatever cross-references. she's connected, she knows people, she's at every party ππ
π sign-off π
this lil page lives in ./drivers/scsi/mpi3mr, and it's dated October 2026 (yes, future girlie π«), pulled from the Kernel API Manual. go get that port ID bestie, and if you get 0xFFFFβ¦ well, we don't talk about that π π
π¦ 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