lpfc_reset_pci_bus(9)
π lpfc_reset_pci_bus β the kernel API manual, but make it make sense
okay so bestie, we're in the lpfc_reset_pci_bus(9) page today β that's the kernel API manual, gateway to the whole Emulex HBA universe, and honestly? this one function is doing a lot of behind-the-scenes work so your PCI bridge controller's secondary bus gets reset like a good little citizen. let's get into it π
β¨ NAME β¨
lpfc_reset_pci_bus β resets the PCI bridge controller's secondary bus of an HBA. yes, that's the whole vibe. it resets a bus. on a bridge. of a controller. on an HBA. iconic behavior honestly π
πΈ SYNOPSIS πΈ
int lpfc_reset_pci_bus (struct lpfc_hba *phba );
like, it takes exactly one thing and gives you back an int. no cap, that's it.
π¦ ARGUMENTS π¦
phbaβ anlpfc_hbapointer. that's the HBA in question, your main character of the moment. it's the thing whosephba->pcidevwe're about to go reset. π«Ά
π DESCRIPTION π
so what actually happens? it issues a PCI secondary bus reset for the phba->pcidev. that's literally the description, bestie β no extra lore, no secret side quests. it goes in, it resets the secondary bus, it comes out. slay. π
π₯ NOTES π₯
okay this is the part where it gets good, because this function is NOT just yolo-resetting things. it's careful. it has β¨standardsβ¨.
first it walks the bus_list to make sure, and the checklist is:
- only PCI devices with Emulex vendor id are hanging out there
- device ids that actually support hot reset
- only one occurrence of function
0 - all ports on the bus are in offline mode
all of that so the hot reset only ever affects one valid HBA. like, the way that it's giving responsible adult energy while still technically doing a hot reset ππ do not sleep on this validation, fr fr.
the whole point of the walk is to keep the reset scoped to exactly one valid HBA β so if you're wondering why it doesn't just fire and forget, this is why.
π RETURN π
here's the mood ring, aka every possible thing you can get back:
-ENOTSUPPβcfg_enable_hba_resetmust be of value2-ENODEVβ NULL ptr topcidev-EBADSLTβ detected invalid device-EBUSYβ port is not in offline state0β successful β¨ (the good ending)
so yeah, if you get something other than 0, check your offline state and your cfg_enable_hba_reset value first. iykyk π
π§ SEE ALSO π§
the kernel file in question is ./drivers/scsi/lpfc/lpfc_attr.c, and then there's... a list. a list list. i'm not gatekeeping a single one of these, so buckle up buttercup, we're going through all of them π:
lpfc_jedec_to_ascii(9)lpfc_drvr_version_show(9)lpfc_enable_fip_show(9)lpfc_info_show(9)lpfc_serialnum_show(9)lpfc_temp_sensor_show(9)lpfc_modeldesc_show(9)lpfc_modelname_show(9)lpfc_programtype_show(9)lpfc_vportnum_show(9)lpfc_fwrev_show(9)lpfc_hdw_show(9)lpfc_option_rom_version_show(9)lpfc_link_state_show(9)lpfc_sli4_protocol_show(9)lpfc_oas_supported_show(9)lpfc_link_state_store(9)lpfc_num_discovered_ports_show(9)lpfc_issue_lip(9)lpfc_do_offline(9)lpfc_selective_reset(9)lpfc_issue_reset(9)lpfc_sli4_pdev_status_reg_wait(9)lpfc_sli4_pdev_reg_request(9)lpfc_nport_evt_cnt_show(9)lpfc_board_mode_show(9)lpfc_board_mode_store(9)lpfc_get_hba_info(9)lpfc_max_rpi_show(9)lpfc_used_rpi_show(9)lpfc_max_xri_show(9)lpfc_used_xri_show(9)lpfc_max_vpi_show(9)lpfc_used_vpi_show(9)lpfc_npiv_info_show(9)lpfc_poll_show(9)lpfc_poll_store(9)lpfc_sriov_hw_max_virtfn_show(9)lpfc_enable_bbcr_set(9)lpfc_wwn_set(9)lpfc_oas_tgt_show(9)lpfc_oas_tgt_store(9)lpfc_oas_priority_show(9)lpfc_oas_priority_store(9)lpfc_oas_vpt_show(9)lpfc_oas_vpt_store(9)lpfc_oas_lun_state_show(9)lpfc_oas_lun_state_store(9)lpfc_oas_lun_status_show(9)lpfc_oas_lun_state_set(9)lpfc_oas_lun_get_next(9)lpfc_oas_lun_state_change(9)lpfc_oas_lun_show(9)lpfc_oas_lun_store(9)lpfc_nodev_tmo_show(9)lpfc_nodev_tmo_init(9)lpfc_update_rport_devloss_tmo(9)lpfc_nodev_tmo_set(9)lpfc_devloss_tmo_set(9)lpfc_tgt_queue_depth_set(9)lpfc_restrict_login_init(9)lpfc_restrict_login_set(9)lpfc_topology_store(9)lpfc_static_vport_show(9)lpfc_link_speed_store(9)lpfc_link_speed_init(9)lpfc_aer_support_store(9)lpfc_aer_cleanup_state(9)lpfc_sriov_nr_virtfn_store(9)lpfc_request_firmware_upgrade_store(9)lpfc_request_firmware_upgrade_init(9)lpfc_force_rscn_store(9)lpfc_force_rscn_init(9)lpfc_fcp_imax_store(9)lpfc_fcp_imax_init(9)lpfc_cq_max_proc_limit_store(9)lpfc_cq_max_proc_limit_init(9)lpfc_fcp_cpu_map_show(9)lpfc_fcp_cpu_map_store(9)lpfc_fcp_cpu_map_init(9)lpfc_cpumask_irq_mode_init(9)lpfc_irq_chann_show(9)lpfc_sg_seg_cnt_show(9)lpfc_sg_seg_cnt_init(9)sysfs_ctlreg_write(9)sysfs_ctlreg_read(9)sysfs_mbox_write(9)sysfs_mbox_read(9)lpfc_alloc_sysfs_attr(9)lpfc_free_sysfs_attr(9)lpfc_get_host_symbolic_name(9)lpfc_get_host_port_id(9)lpfc_get_host_port_type(9)lpfc_get_host_port_state(9)lpfc_get_host_speed(9)lpfc_get_host_fabric_name(9)lpfc_get_stats(9)lpfc_reset_stats(9)lpfc_get_enc_info(9)lpfc_get_node_by_target(9)lpfc_get_starget_port_id(9)lpfc_get_starget_node_name(9)lpfc_get_starget_port_name(9)lpfc_set_rport_loss_tmo(9)lpfc_set_vport_symbolic_name(9)lpfc_hba_log_verbose_init(9)lpfc_get_hba_function_mode(9)lpfc_get_cfgparam(9)lpfc_nvme_mod_param_dep(9)lpfc_get_vport_cfgparam(9)
that's the whole squad. all of them. not me listing every single one like a group chat roll call π but like, you asked, and i deliver π
π«Ά anyway bestie, that's the page. go forth and reset that secondary bus responsibly.
and a lil sign-off for the record keepers: this came from ./drivers/scsi/lpfc, dated October 2026, and it's the lpfc_reset_pci_bus(9) page β so now you know where it lives and when it was born πΈβ¨π
π¦ 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