pci_doe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, meet pci_doe β€” Perform Data Object Exchange. This is pci_doe(9) from the Kernel API Manual, and it's giving tiny-but-powerful PCIe messenger energy, fr fr. πŸ¦‹

πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the whole signature, copied exactly because we do not play with code, no cap:

       int pci_doe (struct pci_doe_mb *doe_mb , u16 vendor , u8 type , const
       void *request , size_t request_sz , void *response , size_t response_sz
       );

✨ ARGUMENTS ✨

  • doe_mb β€” the DOE Mailbox. That's the mailbox, bestie. πŸ’Œ
  • vendor β€” the Vendor ID.
  • type β€” the Data Object Type.
  • request β€” the Request payload.
  • request_sz β€” the Size of request payload (bytes).
  • response β€” the Response payload.
  • response_sz β€” the Size of response payload (bytes).

πŸ’… DESCRIPTION πŸ’…

Okay so the vibe: submit the request to doe_mb and store the response. The DOE exchange is performed synchronously and may therefore sleep β€” yes, it can actually go sleepy-bye, so that's a real thing. 😴

Payloads are treated as opaque byte streams which are transmitted verbatim, without byte-swapping. If payloads contain little-endian register values, the caller is responsible for conversion with cpu_to_le32 / le32_to_cpu. No sneaky swapping, iykyk.

For convenience, arbitrary payload sizes are allowed even though PCIe r6.0 sec 6.30.1 specifies the Data Object Header 2 "Length" in dwords. The last (partial) dword is copied with byte granularity and padded with zeroes if necessary. Callers are thus relieved of using dword-sized bounce buffers. Periodt β€” that's a whole convenience arc. ✨

πŸŽ€ RETURN πŸŽ€

Returns the Length of received response or a negative errno. Received data in excess of response_sz is discarded. The length may be smaller than response_sz, and the caller is responsible for checking that. So yes bestie, check the length yourself β€” don't just assume full-size. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/pci/doe.c β€” and the whole friend group:


πŸ’– that's the whole page, bestie! source is ./drivers/pci, dated October 2026, and the page is pci_doe(9) β€” slay and goodbye. 🫢

πŸ“¦ where this page comes from