lpfc_device_reset_handler(9)
π lpfc_device_reset_handler(9) β the Kernel API Manual glow-up β¨
okay so bestie, we're in the Kernel API Manual today and this one is a little function with big main character energy π it's the eh_device_reset entry point for scsi_host_template, and yes that's a lot of words, but it literally just means "this is the thing that gets called when something needs a device reset." iykyk π¦
β¨ NAME β¨
lpfc_device_reset_handler β the scsi_host_template eh_device_reset entry point π«Ά
like, that's the whole name. short, iconic, does what it says on the tin π
πΈ SYNOPSIS πΈ
int lpfc_device_reset_handler (struct scsi_cmnd *cmnd );
that's it. one argument, one int back. minimalism is a vibe π
π ARGUMENTS π
cmndβ a pointer to ascsi_cmnddata structure π that's the SCSI command struct, it's the whole reason we're all here, she's the guest of honour β¨
π₯ DESCRIPTION π₯
so this routine does a device reset by sending a LUN_RESET task management command π that's the entire plot. it doesn't overthink it, it just yeets a LUN_RESET down the wire and lets the device know we're starting over π
and then the return codes, which are not your usual 0/-E situation, so pay attention bestie π:
0x2003β Error π0x2002β Success π
yes, error is a bigger number. no, we don't know why. we don't ask. we just memorise it π§ no cap, write these down, because if you assume 0 is success you're gonna have a bad time π
π¦ SEE ALSO π¦
the kernel file lives right here, fr fr:
Kernel file ./drivers/scsi/lpfc/lpfc_scsi.c
and then the friend group β the whole lpfc extended universe, everyone's invited, nobody's left out π:
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_target_reset_handler(9)lpfc_host_reset_handler(9)lpfc_sdev_init(9)lpfc_sdev_configure(9)lpfc_sdev_destroy(9)lpfc_create_device_data(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)
π real talk: if lpfc_device_reset_handler is on your stack trace, something downstream already had a rough day. she's not the problem, she's the response to the problem. be nice to her π«Ά
and that's the page bestie!! π this lil masterpiece lives in ./drivers/scsi/lpfc and it's dated October 2026, part of the Kernel API Manual β so if you're reading it, congrats, you're officially deep in the lpfc lore πβ¨ mwah, go reset some devices π
πΈ
π¦ 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