lpfc_bg_scsi...p_dma_buf_s4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lpfc_bg_scsi_prep_dma_buf_s4 β€” the kernel API manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual and it's all about lpfc_bg_scsi_prep_dma_buf_s4(9). yes the name is a mouthful, no we're not shortening it, it's iconic in its own chaotic way πŸ’€


✨ NAME ✨

lpfc_bg_scsi_prep_dma_buf_s4 β€” DMA mapping for scsi buffer to SLI4 IF spec πŸ¦‹

like, that's the whole vibe: you got a scsi buffer, you got SLI4, and this function is the matchmaker doing the DMA mapping between them πŸ’–


✨ SYNOPSIS ✨

int lpfc_bg_scsi_prep_dma_buf_s4 (struct lpfc_hba *phba , struct lpfc_io_buf *lpfc_cmd );

that's it, that's the whole call. two args, one int back. clean. minimal. main character energy πŸ‘‘


✨ ARGUMENTS ✨

  • phba β€” the Hba for which this call is being executed. like, the actual host bus adapter that's about to be out here doin stuff 🫢
  • lpfc_cmd β€” the scsi buffer which is going to be mapped. this one's the little guy getting yeeted into the mapping process 🌸

✨ DESCRIPTION ✨

okay so real talk: this is the protection/DIF aware version of lpfc_scsi_prep_dma_buf. yes, the DIF-aware one. she knows about protection info. she's built different ✨

the page literally says it may be a good idea to combine the two functions eventually β€” but for now, it's here. so like, future refactor tea, but not today bestie πŸ™ˆ

and now the part you cannot skip, the return codes, no cap:

  • 2 β€” Error β€” Do not retry πŸ’€
  • 1 β€” Error β€” Retry πŸ”
  • 0 β€” Success πŸŽ‰

get those right, iykyk. the difference between 2 and 1 is literally "give up" vs "run it back", do not mix them up fr fr 😭


✨ SEE ALSO ✨

buckle up, this list is long and she ate πŸ’… the kernel file itself first:

  • Kernel file ./drivers/scsi/lpfc/lpfc_scsi.c

and then the whole friend group:

like i said. she ate. every single one is here, not a crumb left behind πŸ“


ngl bestie, if you're touching DIF/protection stuff in the lpfc scsi layer, read the return codes twice. 2 means do not retry, and the kernel does not care about your feelings πŸ’€

and that's the page!! πŸŽ€ source path ./drivers/scsi/lpfc, dated October 2026, and the page is literally just lpfc_bg_scsi...p_dma_buf_s4(9) β€” yes the title in the footer is abbreviated with dots, no that's not a typo, that's just how she's filed πŸ’– bye bestie, go map some buffers slay πŸ’…πŸŒˆ

πŸ“¦ where this page comes from