__lpfc_get_device_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ __lpfc_get_device_data(9) β€” from the Kernel API Manual, bestie πŸ’…

okay so picture this: you're deep in the kernel, you've got a host bus adapter, you've got lists, you've got WWPNs everywhere β€” and you just need the device data for one specific lun. That's this function. It's giving "search and rescue but make it SCSI" ✨


🌸 NAME 🌸

__lpfc_get_device_data β€” returns the device data for the specified lun πŸŽ€


⭐ SYNOPSIS ⭐

struct lpfc_device_data* __lpfc_get_device_data (struct lpfc_hba *phba ,
struct list_head *list , struct lpfc_name *vport_wwpn , struct lpfc_name
*target_wwpn , uint64_t lun );

🫢 ARGUMENTS 🫢

  • phba β€” pointer to the host bus adapter structure, the main character of this whole operation πŸ‘‘
  • list β€” point to the list you want searched. yes, "point," that's what the original says, we're not fixing it, we're honoring it πŸ’€
  • vport_wwpn β€” pointer to the vport's wwpn information πŸ¦‹
  • target_wwpn β€” pointer to the target's wwpn information 🌈
  • lun β€” the lun on the target. that's your girl, that's who we're hunting for πŸ”

✨ DESCRIPTION ✨

So what does it actually do? This routine searches the list you passed in for the specified lun's device data. Simple, clean, iconic. πŸ’–

the caveat that matters, no cap: this function does not hold locks. like, at all. It is the responsibility of the caller to ensure the proper lock is held before calling the function. So lock it up yourself before you call her, bestie β€” she is not doing it for you πŸ™ˆ

Return codes:

  • NULL β€” Error πŸ’€
  • Pointer to lpfc_device_data β€” Success πŸŽ‰ slay

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/scsi/lpfc/lpfc_scsi.c β€” go read the source, iykyk πŸ“–


that's the whole page, bestie, every last one of those (9) references accounted for πŸ§šπŸ’œ

sign-off era: this one lives in ./drivers/scsi/lpfc, dated October 2026, and it's filed under __lpfc_get_device_data(9) β€” periodt. πŸ“

πŸ“¦ where this page comes from