lpfc_reset_flush_io_context(9)
π
lpfc_reset_flush_io_context(9)
okay so this one's from the Kernel API Manual, and bestie, it's a kernel-function page β no cap. Here we go π«Ά
β¨ NAME β¨
lpfc_reset_flush_io_context β the little cleanup goblin that flushes orphaned i/o contexts off the adapter after a reset π
πΈ SYNOPSIS πΈ
int lpfc_reset_flush_io_context (struct lpfc_vport *vport , uint16_t
tgt_id , uint64_t lun_id , lpfc_ctx_cmd context );
literally that's the whole signature, copy it exactly please, don't be quirky with it π
π ARGUMENTS π
vportβ the virtual port (aka the scsi_host) that we're flushing the context for π¦tgt_idβ if you're aborting by Target context, this is where you say which target id π₯lun_idβ if you're aborting by Lun context, this is where you drop the lun id βcontextβ specifies the context level to flush at π
π¦ DESCRIPTION π¦
so after a reset condition comes through via TMF, we gotta flush the orphaned i/o contexts out of the adapter. that's the whole vibe of this routine: it aborts any contexts that are still outstanding, then it waits for their completions to come back π
but the wait is bounded by devloss_tmo though β so it's not gonna sit there waiting forever like it's in its feels. it's got a timeout, periodt π
Return code: 0x2003 - Error, 0x2002 - Success π
ok so heads up, the error number is the bigger one here (0x2003) and success is0x2002. that's literally what the page says, so don't come for me π
π SEE ALSO π
Kernel file ./drivers/scsi/lpfc/lpfc_scsi.c β iconic, go read it β¨
and now the friend group, all of them, in order, no one left behind π§:
- the xri/queue girlies:
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) - the scsi buf squad:
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) - the
bg/ protection-info crew: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) - more dma prep:
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) - request blocking & cmf:
lpfc_unblock_requests(9),lpfc_block_requests(9),lpfc_update_cmf_cmpl(9),lpfc_update_cmf_cmd(9) - error & completion handlers:
lpfc_handle_fcp_err(9),lpfc_fcp_io_cmd_wqe_cmpl(9),lpfc_scsi_cmd_iocb_cmpl(9) - command prep, all the flavours:
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) - reset & detection:
lpfc_check_pci_resettable(9),lpfc_info(9) - the poll timers:
lpfc_poll_rearm_timer(9),lpfc_poll_start_timer(9),lpfc_poll_timeout(9) - queue & abort handlers:
lpfc_queuecommand(9),lpfc_abort_handler(9),lpfc_check_fcp_rsp(9),lpfc_send_taskmgmt(9),lpfc_chk_tgt_mapped(9) - the reset handler trio, main character energy fr fr:
lpfc_device_reset_handler(9),lpfc_target_reset_handler(9),lpfc_host_reset_handler(9) - sdev lifecycle:
lpfc_sdev_init(9),lpfc_sdev_configure(9),lpfc_sdev_destroy(9) - device data:
lpfc_create_device_data(9),lpfc_delete_device_data(9),__lpfc_get_device_data(9)(yes the double underscore is on purpose, don't touch it π) and the oas lun gang:lpfc_find_next_oas_lun(9),lpfc_enable_oas_lun(9),lpfc_disable_oas_lun(9)
that's the whole page, bestie, you ate it πΈ
sign-off time π«Ά this one lives at ./drivers/scsi/lpfc, dated October 2026, and it's page lpfc_reset_flush_io_context(9) β go flush those contexts, ily, bye π
π¦ 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