lpfc_bsg_send_mgmt_cmd_cmp(9)
π NAME π
lpfc_bsg_send_mgmt_cmd_cmp β the completion handler for lpfc_bsg_send_mgmt_cmd, bestie. That's the whole vibe of this page, and honestly? Iconic.
Oh and hey, welcome to the Kernel API Manual π β yes, that's the manual name, we're doing this properly.
β¨ SYNOPSIS β¨
void lpfc_bsg_send_mgmt_cmd_cmp (struct lpfc_hba *phba , struct
lpfc_iocbq *cmdiocbq , struct lpfc_iocbq *rspiocbq );
π«Ά ARGUMENTS π«Ά
phbaβ pointer to the HBA context object. Like, the whole adapter's whole personality in one struct πcmdiocbqβ pointer to the command iocb. The thing that got sent out.rspiocbqβ pointer to the response iocb. The thing that came back.
πΈ DESCRIPTION πΈ
Okay so picture this: this function is the completion handler for iocbs that got issued via the lpfc_bsg_send_mgmt_cmd function. That's its whole job description and it ate, no cap.
The ring event handler function calls it, and β important detail β it gets called without any lock held π. Literally lockless. Free spirit energy.
Where can it run? Bestie, everywhere:
- it can be called from worker thread context
- and it can be called from interrupt context π
- and it can also be called from another thread which cleans up the SLI layer objects
So yeah, it's giving main character energy, showing up in three different contexts like it owns the place.
What does it actually do though? Two things, and they're both slay:
- It copies the contents of the response iocb to the response iocb memory object that was provided by the caller of
lpfc_sli_issue_iocb_waitπ¦ - Then it wakes up the thread which sleeps for the iocb completion β° β rise and grind, sleepy thread, your iocb is done
No locks, multiple contexts, and it's the one doing the waking up. Respect the multitasking, fr fr.
π SEE ALSO π
Kernel file ./drivers/scsi/lpfc/lpfc_bsg.c β go read it, iykyk π
lpfc_bsg_send_mgmt_cmd(9),lpfc_bsg_rport_els_cmp(9),lpfc_bsg_rport_els(9)lpfc_bsg_event_free(9),lpfc_bsg_event_ref(9),lpfc_bsg_event_unref(9),lpfc_bsg_event_new(9)diag_cmd_data_free(9)lpfc_bsg_ct_unsol_abort(9),lpfc_bsg_hba_set_event(9),lpfc_bsg_hba_get_event(9)lpfc_issue_ct_rsp_cmp(9),lpfc_issue_ct_rsp(9)lpfc_bsg_send_mgmt_rsp(9)lpfc_bsg_diag_mode_enter(9),lpfc_bsg_diag_mode_exit(9)lpfc_sli3_bsg_diag_loopback_mode(9)lpfc_sli4_bsg_set_link_diag_state(9)lpfc_sli4_bsg_set_loopback_mode(9),lpfc_sli4_diag_fcport_reg_setup(9)lpfc_sli4_bsg_diag_loopback_mode(9),lpfc_bsg_diag_loopback_mode(9)lpfc_sli4_bsg_diag_mode_end(9),lpfc_sli4_bsg_link_diag_test(9)lpfcdiag_loop_self_reg(9),lpfcdiag_loop_self_unreg(9)lpfcdiag_loop_get_xri(9)lpfc_bsg_dma_page_alloc(9),lpfc_bsg_dma_page_free(9),lpfc_bsg_dma_page_list_free(9)diag_cmd_data_alloc(9)lpfcdiag_sli3_loop_post_rxbufs(9)lpfc_bsg_diag_loopback_run(9)lpfc_bsg_get_dfc_rev(9)lpfc_bsg_issue_mbox_cmpl(9),lpfc_bsg_check_cmd_access(9)lpfc_bsg_mbox_ext_session_reset(9)lpfc_rd_obj_emb0_handle_job(9)lpfc_bsg_issue_mbox_ext_handle_job(9)lpfc_bsg_issue_read_mbox_ext_cmpl(9)lpfc_bsg_issue_write_mbox_ext_cmpl(9)lpfc_bsg_sli_cfg_read_cmd_ext(9),lpfc_bsg_sli_cfg_write_cmd_ext(9)lpfc_bsg_handle_sli_cfg_mbox(9)lpfc_bsg_mbox_ext_abort(9)lpfc_bsg_read_ebuf_get(9)lpfc_bsg_write_ebuf_set(9)lpfc_bsg_handle_sli_cfg_ebuf(9)lpfc_bsg_handle_sli_cfg_ext(9)lpfc_bsg_issue_mbox(9)lpfc_bsg_mbox_cmd(9)lpfc_check_fwlog_support(9)lpfc_bsg_get_ras_config(9),lpfc_bsg_set_ras_config(9)lpfc_bsg_get_ras_lwpd(9),lpfc_bsg_get_ras_fwlog(9)lpfc_bsg_hst_vendor(9)lpfc_bsg_request(9),lpfc_bsg_timeout(9)
π that's the whole page, bestie π This little love letter lives in ./drivers/scsi/lpfc, dated October 2026, and it's filed under lpfc_bsg_send_mgmt_cmd_cmp(9) β go forth and slay your completions π¦β¨π
π¦ 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