mpi3mr_get_tgtdev_by_addr(9)
π mpi3mr_get_tgtdev_by_addr(9) β the kernel API manual, bestie edition π
okay so picture this: you're deep in the mpi3mr driver, you've got a SAS address and an HBA port burning a hole in your pocket, and you just need the target device that matches. That's this function. It lives in the mpi3mr_get_tgtdev_by_addr(9) page of the Kernel API Manual, and honestly? It's giving "tiny function, big main character energy." β¨
πΈ NAME πΈ
mpi3mr_get_tgtdev_by_addr β target device search, aka the find-my-fave-device moment π
π¦ SYNOPSIS π¦
struct mpi3mr_tgt_dev * mpi3mr_get_tgtdev_by_addr (struct mpi3mr_ioc
*mrioc , u64 sas_address , struct mpi3mr_hba_port *hba_port );
like yes, that's the whole signature, no cap π«Ά
π ARGUMENTS π
mriocβ the adapter instance reference. Your whole controller, your whole vibe. πsas_addressβ the SAS address of the device you're hunting for. This is theu64, so treat it with respect. β¨hba_portβ the HBA port entry. The other half of the matching puzzle. π
π DESCRIPTION π
So what does it actually do? It searches for a target device using the SAS address and the HBA port pointer β both, together, as a duo β and then it returns the mpi3mr_tgt_dev object. That's it. That's the whole plot. Lowkey iconic in its simplicity. π¦
π₯ CONTEXT π₯
Important vibe check before you call this: the function will acquire tgtdev_lock, and it will release it before returning the mpi3mr_tgt_dev object. So the lock is held during the searching, not during your happy little post-return celebration. Don't forget that part, fr fr. π
β RETURN β
A valid tget_dev or NULL.
(yes, tget_dev β that's literally what the page says, I'm not gonna gaslight you and "fix" it π)
π SEE ALSO π
Buckle up bestie, this list is long and every single one of them is invited to the group chat:
Kernel file ./drivers/scsi/mpi3mr/mpi3mr_transport.cmpi3mr_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_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)mpi3mr_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_sas_phy(9)mpi3mr_get_port_id_by_rphy(9)mpi3mr_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)
and that's the whole page, bestie!! π«Ά this lil masterpiece comes to you courtesy of ./drivers/scsi/mpi3mr and it's dated October 2026 β so yeah, stay tuned, she's ahead of her time. slay, happy hacking, and may all your struct mpi3mr_tgt_dev * come back non-NULL β¨π
π
π¦ 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