zpci_hot_reset_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zpci_hot_reset_device β€” from the Kernel API Manual, bestie πŸ’–

okay so picture this: you're deep in the kernel, you've got a zPCI function acting up, and you need it to just... chill. reset. start over. That's this whole function. It lives in the Kernel API Manual and honestly? It's giving "let me fix her" energy. ✨


✨ SYNOPSIS ✨

int zpci_hot_reset_device (struct zpci_dev *zdev );

πŸŽ€ ARGUMENTS πŸŽ€

  • zdev β€” the slot which should be reset. That's the one. The main character. Point her at the struct zpci_dev you wanna reset and let the function do its thing 🫢

🌸 DESCRIPTION 🌸

Bestie, listen. This performs a low level reset of the zPCI function. And when we say "low level" we mean the cute kind of low level: the zPCI function gets reset without detaching it from the common PCI subsystem. No messy breakup. She stays in the relationship. πŸ’–

The reset may be performed while the function is under control of either DMA or IOMMU APIs β€” and in that case, the existing DMA/IOMMU translation table is reinstated at the end of the reset. So like, the translation table girlies get put right back where they were. no cap. ✨

After the reset, the function's internal state is reset to an initial state equivalent to its state during boot when first probing a driver. Which is honestly so iconic of her β€” full factory reset, back to her boot-era self. 🌸

Consequently 😭 after reset, the PCI function requires re-initialization via the common PCI code, and that includes:

  • re-enabling IRQs via pci_alloc_irq_vectors
  • enabling the function via e.g. pci_enable_device_flags
⚠️ The caller must guard against concurrent reset attempts. Like, do not let two resets show up to the same party. That is NOT the vibe. fr fr.

In most cases this function should not be called directly β€” go through pci_reset_function or pci_reset_bus instead, which handle the save/restore and locking. And the locking? Asserted by lockdep. So lockdep is literally standing there with a clipboard doing the vibe check. πŸ’…

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • an error value otherwise πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./arch/s390/pci/pci.c


and that's the page bestie!! 🌈 mwah πŸ’‹ this one's brought to you by the fine folks over at ./arch/s390/pci, dated October 2026, under the zpci_hot_reset_device(9) name β€” go forth and reset responsibly πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from