pci_set_full_power_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pci_set_full_power_state(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this one's literally called pci_set_full_power_state(9) and it's about waking a PCI device all the way up. stay with me, it's actually so good 🫢


🌸 NAME 🌸

pci_set_full_power_state β€” Put a PCI device into D0 and update its state πŸ’…


✨ SYNOPSIS ✨

int pci_set_full_power_state (struct pci_dev *dev , bool locked );

yes, the spacing is exactly like that, don't come for me 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the PCI device you're powering up, aka the main character of this whole operation πŸ‘‘
  • locked β€” whether pci_bus_sem is held πŸ”’ like, are we already holding the lock or not, bestie

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe 🌈: it calls pci_power_up to put dev into D0, then it reads from its PCI_PM_CTRL register to confirm the state change actually happened (trust but verify, periodt πŸ’€), then it restores its BARs if they might be lost, and reconfigures ASPM in accordance with the new power state. the way that's four whole jobs in one function, iconic honestly ✨

πŸ“ real talk though: if pci_restore_state is gonna be called right after a power state change to D0, it's more efficient to just use pci_power_up directly instead of this function. like, don't do extra work for no reason, ngl πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/pci/pci.c β€” and then the entire extended friend group, no cap, they're all here 😭 πŸ’œ

like I said. whole squad. iykyk πŸ’€πŸ’…


okay that's the whole page, bestie 🫢 this little icon came from the source dir ./drivers/pci, dated October 2026, and the page is literally pci_set_full_power_state(9) β€” go put some devices in D0, you got this βœ¨πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from