lpfc_reset_pci_bus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” an lpfc_hba pointer. that's the HBA in question, your main character of the moment. it's the thing whose phba->pcidev we'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_reset must be of value 2
  • -ENODEV β€” NULL ptr to pcidev
  • -EBADSLT β€” detected invalid device
  • -EBUSY β€” port is not in offline state
  • 0 β€” 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 πŸ“:

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