unassign_adapter_store(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ unassign_adapter_store β€” Kernel API Manual πŸŽ€

okay so bestie, welcome to the unassign_adapter_store(9) page β€” yes, that's the manual name, and it's giving kernel API realness. this one is about unassigning an adapter, and it's lowkey important, so let's get into it. πŸ’–

✨ NAME ✨

unassign_adapter_store β€” parses the APID from @buf and clears the corresponding bit in the mediated matrix device's APM. that's it, that's the whole slay. πŸ’…

πŸ’» SYNOPSIS πŸ’»

fr fr, the exact signature is:

ssize_t unassign_adapter_store (struct device *dev , struct
device_attribute *attr , const char *buf , size_t count );

No cap, that's the shape. 🫢

🧩 ARGUMENTS 🧩

  • dev β€” the matrix device. literally the matrix device, okay? πŸ’–
  • attr β€” the mediated matrix device's unassign_adapter attribute. yes bestie, that exact attribute. πŸŽ€
  • buf β€” a buffer containing the adapter number (APID) to be unassigned. the APID is in there, waiting to get unassigned. ✨
  • count β€” the number of bytes in buf. just count, bestie. πŸ¦‹

πŸ” RETURN πŸ”

so if the APID is valid, you get the number of bytes processed. that's the win. 🌸

otherwise, it returns one of these errors:

  • -EINVAL β€” if the APID is not a number. not a number? rejected, periodt. πŸ’…
  • -ENODEV β€” if the APID it exceeds the maximum value configured for the system. yes, that's the wording, and it means the APID is over the configured max β€” highkey too much. 😭

πŸ‘€ SEE ALSO πŸ‘€

Kernel file: ./drivers/s390/crypto/vfio_ap_ops.c β€” that's where the magic lives. 🧚

also peep these (9) pages, bestie, because they're all in the same friend group:


mwah πŸ’‹ this cutie comes from source/version ./drivers/s390/crypto and is dated October 2026 β€” and yes, the page is unassign_adapter_store(9), iykyk. 🫢

πŸ“¦ where this page comes from