mpi3mr_get_tgtdev_by_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the u64, 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:


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