lpfc_create_device_data(9)
π lpfc_create_device_data(9) β the kernel API manual, but make it make sense π
okay so bestie, we're in the Kernel API Manual today and this page is literally about lpfc_create_device_data β the little function that spins up a whole device data structure for OAS. yes, that OAS. stay with me, it's gonna slay. β¨
πΈ NAME πΈ
lpfc_create_device_data β creates and initializes device data structure for OAS
like, it makes the thing and sets up the thing, both. overachiever behaviour fr fr π
β¨ SYNOPSIS β¨
struct lpfc_device_data* lpfc_create_device_data (struct lpfc_hba *phba
, struct lpfc_name *vport_wwpn , struct lpfc_name *target_wwpn ,
uint64_t lun , uint32_t pri , bool atomic_create );
that's the whole signature, no cap β copy it exactly if you're typing it out. π«Ά
π ARGUMENTS π
six of them. all iconic, all doing their job:
phbaβ pointer to the host bus adapter structure. the main character, honestly.vport_wwpnβ pointer to the vport's wwpn information.target_wwpnβ pointer to the target's wwpn information.lunβ the lun on the target. yep, just the lun, living its life.priβ priority. that's it. that's the whole description, and we respect it.atomic_createβ flag that tells us whether memory should be allocated with theGFP_ATOMICflag or not. so like, "can we sleep or are we in a rush" energy π
π¦ DESCRIPTION π¦
so this routine creates a device data structure β and not just any structure, it's the one that holds all the identifying info for the device: host wwpn, target wwpn, lun. it also keeps the state of OAS, tracks whether or not the corresponding lun is actually available by the system, and holds a pointer to the rport data. it's giving "one struct to hold the entire vibe check of a device" π
return codes, bestie, memorise these:
NULL - Error
Pointer to lpfc_device_data - Success
so if you get NULL back, that's a no. if you get a lpfc_device_data pointer back, that's a yes. slay. π
π₯ SEE ALSO π₯
first up, the actual file, because context is everything:
- Kernel file
./drivers/scsi/lpfc/lpfc_scsi.c
and now the friend group β the whole extended squad, all of them, in order, exactly as the manual lists them:
lpfc_sli4_set_rsp_sgl_last(9),lpfc_rampdown_queue_depth(9),lpfc_ramp_down_queue_handler(9),lpfc_scsi_dev_block(9),lpfc_new_scsi_buf_s3(9),lpfc_sli4_vport_delete_fcp_xri_aborted(9),lpfc_sli4_io_xri_aborted(9),lpfc_get_scsi_buf_s3(9),lpfc_get_scsi_buf_s4(9),lpfc_get_scsi_buf(9),lpfc_release_scsi_buf_s3(9),lpfc_release_scsi_buf_s4(9),lpfc_release_scsi_buf(9),lpfc_fcpcmd_to_iocb(9),lpfc_scsi_prep_dma_buf_s3(9),lpfc_bg_err_inject(9),lpfc_sc_to_bg_opcodes(9),lpfc_bg_err_opcodes(9),lpfc_bg_setup_bpl(9),lpfc_bg_setup_bpl_prot(9),lpfc_bg_setup_sgl(9),lpfc_bg_setup_sgl_prot(9),lpfc_prot_group_type(9),lpfc_bg_scsi_adjust_dl(9),lpfc_bg_scsi_prep_dma_buf_s3(9),lpfc_scsi_prep_dma_buf_s4(9),lpfc_bg_scsi_prep_dma_buf_s4(9),lpfc_scsi_prep_dma_buf(9),lpfc_bg_scsi_prep_dma_buf(9),lpfc_scsi_prep_cmnd_buf(9),lpfc_send_scsi_error_event(9),lpfc_scsi_unprep_dma_buf(9)lpfc_unblock_requests(9),lpfc_block_requests(9),lpfc_update_cmf_cmpl(9),lpfc_update_cmf_cmd(9),lpfc_handle_fcp_err(9),lpfc_fcp_io_cmd_wqe_cmpl(9),lpfc_scsi_cmd_iocb_cmpl(9),lpfc_scsi_prep_cmnd_buf_s3(9),lpfc_scsi_prep_cmnd_buf_s4(9),lpfc_scsi_prep_cmnd(9),lpfc_scsi_prep_task_mgmt_cmd_s3(9),lpfc_scsi_prep_task_mgmt_cmd_s4(9),lpfc_scsi_api_table_setup(9),lpfc_tskmgmt_def_cmpl(9),lpfc_check_pci_resettable(9),lpfc_info(9),lpfc_poll_rearm_timer(9),lpfc_poll_start_timer(9),lpfc_poll_timeout(9),lpfc_queuecommand(9),lpfc_abort_handler(9),lpfc_check_fcp_rsp(9)lpfc_send_taskmgmt(9),lpfc_chk_tgt_mapped(9),lpfc_reset_flush_io_context(9),lpfc_device_reset_handler(9),lpfc_target_reset_handler(9),lpfc_host_reset_handler(9),lpfc_sdev_init(9),lpfc_sdev_configure(9),lpfc_sdev_destroy(9),lpfc_delete_device_data(9),__lpfc_get_device_data(9),lpfc_find_next_oas_lun(9),lpfc_enable_oas_lun(9),lpfc_disable_oas_lun(9)
that's the whole list, nothing skipped, nothing merged β go read them if you're nosy, iykyk π
ok real talk for a sec π«Ά βNULLmeans error, a validlpfc_device_datapointer means success. always check which one you got before you go touching that struct, bestie. no cap.
and that's the page!! π this one lives under ./drivers/scsi/lpfc, dated October 2026 β mwah, bookmark it, screenshot it, send it to the group chat. periodt. ππ§
π¦ 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