lpfc_read_topology(9)
π lpfc_read_topology β ok bestie, let's talk HBA topology π¦
So this is a page from the Kernel API Manual β it's lpfc_read_topology(9), and it's genuinely one of the cuter little mailbox helpers in the lpfc driver. Come sit with me, this is gonna be fun β¨
β¨ NAME β¨
lpfc_read_topology β prepare a mailbox command for reading HBA topology π
Like, that's literally the whole job. Prep the mbox, hand it over, let the HBA do its thing.
πΈ SYNOPSIS πΈ
int lpfc_read_topology (struct lpfc_hba *phba , LPFC_MBOXQ_t *pmb ,
struct lpfc_dmabuf *mp );
Three args, returns an int, no drama. Slay π
π ARGUMENTS π
phbaβ pointer to lpfc hba data structure. It's the HBA main character, everything routes through it π«Άpmbβ pointer to the driver internal queue element for mailbox command. The little envelope your command travels in π¬mpβ DMA buffer memory for reading the link attention information into. The HBA DMAs into this, so it has to already be set aside and its address handed over π
π¦ DESCRIPTION π¦
Okay so, the read topology mailbox command gets issued to read the link topology information that the HBA port is indicating β and when does that happen? Two flavors, iykyk:
- when the Link Event bit of the Host Attention (
HSTATT) register is set to1(For SLI-3), or - when an FC Link Attention ACQE is received from the port (For SLI-4).
A Link Event Attention happens based on an exception detected at the Fibre Channel link interface. Not me explaining link exceptions at 2am π but here we are.
This routine prepares the mailbox command for reading HBA link topology information. A DMA memory has been set aside, and its address is passed to the HBA through mp, so the HBA can DMA the link attention information into that memory as part of executing the mailbox command. The way that works is honestly iconic β you give it the address, it does the transfer, everybody wins π«
Return codes: 0 - Success (currently always return 0). Fr fr, always zero. No cap. π
Ngl, that "(currently)" is doing a lot of heavy lifting β it's a promise, not a forever-guarantee π
π SEE ALSO π
Kernel file ./drivers/scsi/lpfc/lpfc_mbox.c, plus the whole friend group:
lpfc_mbox_rsrc_prep(9), lpfc_mbox_rsrc_cleanup(9), lpfc_dump_static_vport(9), lpfc_down_link(9), lpfc_dump_mem(9), lpfc_dump_wakeup_param(9), lpfc_read_nv(9), lpfc_config_async(9), lpfc_heart_beat(9), lpfc_clear_la(9), lpfc_config_link(9), lpfc_config_msi(9), lpfc_init_link(9), lpfc_read_sparam(9), lpfc_unreg_did(9), lpfc_read_config(9), lpfc_read_lnk_stat(9), lpfc_reg_rpi(9), lpfc_unreg_login(9), lpfc_sli4_unreg_all_rpis(9), lpfc_reg_vpi(9), lpfc_unreg_vpi(9), lpfc_config_pcb_setup(9), lpfc_read_rev(9), lpfc_build_hbq_profile2(9), lpfc_build_hbq_profile3(9), lpfc_build_hbq_profile5(9), lpfc_config_hbq(9), lpfc_config_ring(9), lpfc_config_port(9), lpfc_kill_board(9), lpfc_mbox_put(9), lpfc_mbox_get(9), __lpfc_mbox_cmpl_put(9), lpfc_mbox_cmpl_put(9), lpfc_mbox_cmd_check(9), lpfc_mbox_dev_check(9), lpfc_mbox_tmo_val(9), lpfc_sli4_mbx_sge_set(9), lpfc_sli4_mbx_sge_get(9), lpfc_sli4_mbox_cmd_free(9), lpfc_sli4_config(9), lpfc_sli4_mbox_rsrc_extent(9), lpfc_sli_config_mbox_subsys_get(9), lpfc_sli_config_mbox_opcode_get(9), lpfc_sli4_mbx_read_fcf_rec(9), lpfc_request_features(9), lpfc_init_vfi(9), lpfc_reg_vfi(9), lpfc_init_vpi(9), lpfc_unreg_vfi(9), lpfc_sli4_dump_cfg_rg23(9), lpfc_reg_fcfi(9), lpfc_reg_fcfi_mrq(9), lpfc_unreg_fcfi(9), lpfc_resume_rpi(9)
That's the whole page, bestie β go read some link topology, you're gonna eat π β¨
π· Cute little sign-off: this one lives under ./drivers/scsi/lpfc, and it's dated October 2026. Obsessed with her being from the future ππ¦
π¦ 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