mpt3sas_tra..._port_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

(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 returns void, so don't go looking for a return value β€” there isn't one. and it grabs ioc->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