mpt3sas_tra..._port_remove(9)
β¨ mpt3sas_tra..._port_remove(9) β¨
okay so this is a page straight out of the Kernel API Manual, bestie β and it's giving "small function, big responsibilities" energy. it's one of those mpt3sas transport helpers, and today's main character is the one that yeets a port off the list. buckle up π
πΈ NAME πΈ
mpt3sas_transport_port_remove β remove port from the list π
like. that's the whole gig. it removes a port from the list. iconic, honestly.
π¦ SYNOPSIS π¦
void mpt3sas_transport_port_remove (struct MPT3SAS_ADAPTER *ioc , u64
sas_address , u64 sas_address_parent , struct hba_port *port );
returns void, so it does NOT come back with receipts β no return value, no notes, it just does the thing and leaves π
π ARGUMENTS π
iocβ the per adapter object. it's the whole vibe, the big picture, the adapter that owns all this stuff.sas_addressβ sas address of the attached device. basically the device's @ π«Άsas_address_parentβ sas address of the parent expander or the sas host. the device's "who's your parent" energy.portβ the hba port entry. this is the actual port object getting packed up and sent on its way π§³
β CONTEXT β
heads up, this is the important part: this function will acquire ioc->sas_node_lock π
so like, it's locking things. respect the lock. the lock is the main character for a sec. no cap.
π₯ DESCRIPTION π₯
removing object and freeing associated memory from the ioc->sas_port_list πβ¨
that's it, that's the whole lore. it takes the object off the list and frees the memory that was hanging out with it. tidy. clean. slays. the ioc->sas_port_list literally loses an entry and gains some breathing room.
π SEE ALSO π
the whole extended friend group, fr fr β kernel file ./drivers/scsi/mpt3sas/mpt3sas_transport.c plus:
_transport_get_port_id_by_sas_phy(9)_transport_sas_node_find_by_sas_address(9)_transport_get_port_id_by_rphy(9)_transport_convert_phy_link_rate(9)_transport_set_identify(9)mpt3sas_transport_done(9)_transport_expander_report_manufacture(9)_transport_delete_port(9)_transport_delete_phy(9)_transport_add_phy(9)mpt3sas_transport_add_phy_to_an_existing_port(9)mpt3sas_transport_del_phy_from_an_existing_port(9)_transport_sanity_check(9)mpt3sas_transport_port_add(9)mpt3sas_transport_add_host_phy(9)mpt3sas_transport_add_expander_phy(9)mpt3sas_transport_update_links(9)_transport_get_expander_phy_error_log(9)_transport_get_linkerrors(9)_transport_get_enclosure_identifier(9)_transport_get_bay_identifier(9)_transport_expander_phy_control(9)_transport_phy_reset(9)_transport_phy_enable(9)_transport_phy_speed(9)_transport_smp_handler(9)
(also lowkey the inverse bestie mpt3sas_transport_port_add(9) is right there in the list, they're literally yin and yang π«Ά)
β¨ reminder bestie: this one returnsvoid, so don't go looking for a return value β there isn't one. and it grabsioc->sas_node_lock, so plan accordingly. β¨
and that's the page!! brought to you by the fine folks at ./drivers/scsi/mpt3sas, dated October 2026, living their best life under the Kernel API Manual banner. mwah π go free that memory, queen ππ
π¦ 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