pci_doe(9)
πΈ 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:
struct pci_doe_mb(9)struct pci_doe_task(9)pci_doe_create_mb(9)pci_doe_destroy_mb(9)pci_doe_supports_feat(9)pci_doe_submit_task(9)pci_find_doe_mailbox(9)
π 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
- 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