pci_reset_function_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is pci_reset_function_locked(9) from the Kernel API Manual, and the whole assignment is: quiesce and reset a PCI device function. πŸ’…βœ¨

✨ SYNOPSIS ✨

the signature is literally:

int pci_reset_function_locked (struct pci_dev *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” PCI device to reset 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Some devices allow an individual function to be reset without affecting other functions in the same device. That's the dream scenario, bestie. ✨ But the PCI device must be responsive to PCI config space in order to use this function β€” no config-space replies, no reset magic.

This function does not just reset the PCI portion of a device, but clears all the state associated with the device. It's giving full state wipe, not a tiny poke. πŸ’…

The way it differs from __pci_reset_function_locked is that it saves and restores device state over the reset. And it also differs from pci_reset_function in that it requires the PCI device lock to be held. iykyk. πŸ”’

πŸ’… CONTEXT πŸ’…

The caller must hold the device lock. Like, that's not optional. Hold the lock, bestie. πŸ”’βœ¨

πŸ”₯ RETURN πŸ”₯

0 if the device function was successfully reset, or negative if the device doesn't support resetting a single function. That's the whole return vibe. Negative = no single-function reset support. 🫢

🌈 SEE ALSO 🌈

okay the SEE ALSO friend group is huge and every single one is invited. The kernel file is ./drivers/pci/pci.c, and then:


mwah πŸ’‹ β€” source/version: ./drivers/pci; date: October 2026; and the page is pci_reset_function_locked(9). periodt. 🫢

πŸ“¦ where this page comes from