zpci_add_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zpci_add_device(9) β€” the kernel API manual, but make it make sense ✨

okay bestie, so this one is a page straight out of the Kernel API Manual, and it's literally about giving a zPCI device its whole moment. like, the device exists already, and this function is what makes it ✨official✨ in the zPCI subsystem. let's get into it 🫢


πŸŽ€ NAME πŸŽ€

zpci_add_device β€” take a zPCI device you already created and actually, y'know, add it to the zPCI subsystem. no cap, that's the whole vibe check. πŸ’–


✨ SYNOPSIS ✨

int zpci_add_device (struct zpci_dev *zdev );

that's the whole signature, keep it exactly like that, she's iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • zdev β€” the zPCI device you want to add. that's the one, that's the main character πŸ‘‘

🌸 DESCRIPTION 🌸

okay so picture this: a struct zpci_dev gets added to the zPCI subsystem, and also to a virtual PCI bus β€” and a brand-new bus gets created as necessary if there isn't one already. a hotplug slot gets created, and events start being handled. it's giving "new kid walks in, whole room shifts" 😭πŸ”₯

important bestie: if this succeeds, then from this point on you must use zpci_zdev_get and zpci_zdev_put. those two. not whatever you were doing before. periodt.

and if adding the struct zpci_dev fails, then the device was not added, and it should be freed. don't leave it lying around, that's littering πŸ™ˆ


⭐ RETURN ⭐

0 on success, or an error code otherwise. that's it, that's the deal πŸŽ€


🌈 SEE ALSO 🌈

all the siblings in the family, go read them, iykyk πŸ’œ


and that's the page, bestie πŸ’– from ./arch/s390/pci, dated October 2026, and the page herself is zpci_add_device(9) β€” go add some devices and slay responsibly, mwah 🧚✨

πŸ“¦ where this page comes from