zpci_hot_reset_device(9)
π 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 thestruct zpci_devyou 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 π₯
0on success π- an error value otherwise π
π SEE ALSO π
Kernel file ./arch/s390/pci/pci.c
zpci_create_device(9)zpci_add_device(9)zpci_scan_configured_device(9)zpci_deconfigure_device(9)zpci_device_reserved(9)zpci_clear_error_state(9)zpci_reset_load_store_blocked(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms