STRUCT CDX_MCDI_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct cdx_mcdi_cmd β€” an outstanding MCDI command. That’s the whole name, bestie. This page is from the Kernel API Manual, and the main character is literally struct cdx_mcdi_cmd(9). πŸ’…

Vibe check: this struct is the little receipt for one outstanding MCDI command. No cap, every field is about to get its moment. 🫢

🌸 SYNOPSIS 🌸

Here’s the struct, character for character, exactly as it is:

       struct cdx_mcdi_cmd {
           struct kref ref;
           struct list_head list;
           struct list_head cleanup_list;
           struct work_struct work;
           struct cdx_mcdi_iface *mcdi;
           enum cdx_mcdi_cmd_state state;
           size_t inlen;
           const struct cdx_dword *inbuf;
           bool quiet;
           bool reboot_seen;
           u8 seq;
           unsigned long started;
           unsigned long cookie;
           cdx_mcdi_async_completer *completer;
           unsigned int handle;
           unsigned int cmd;
           int rc;
           size_t outlen;
           struct cdx_dword *outbuf;
        };

🫢 Members 🫢

Every member, every detail, nothing skipped:

  • ref β€” Reference count. There will be one reference if the command is in the mcdi_iface cmd_list, another if it’s on a cleanup list, and a third if it’s queued in the work queue. Three possible refs, iykyk.
  • list β€” The data for this entry in mcdi->cmd_list. That’s its spot in the list.
  • cleanup_list β€” The data for this entry in a cleanup list. 🧹
  • work β€” The work item for this command, queued in mcdi->workqueue. Work queue behavior, slay.
  • mcdi β€” The mcdi_iface for this command. Its whole interface connection.
  • state β€” The state of this command. Current status vibes.
  • inlen β€” inbuf length. πŸ“
  • inbuf β€” Input buffer. Where the input lives.
  • quiet β€” Whether to silence errors. 🀫
  • reboot_seen β€” Whether a reboot has been seen during this command, to prevent duplicates. Important: this is the duplicate-prevention flag.
  • seq β€” Sequence number. πŸ”’
  • started β€” Jiffies this command was started at. Timestamp energy, but in jiffies.
  • cookie β€” Context for completion function. πŸͺ
  • completer β€” Completion function. It completes things, periodt.
  • handle β€” Command handle. πŸŽ€
  • cmd β€” Command number. Number time.
  • rc β€” Return code. Classic rc.
  • outlen β€” Length of output buffer. πŸ“
  • outbuf β€” Output buffer. Where the output goes.

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./include/linux/cdx/mcdi.h
  • enum cdx_mcdi_mode(9)
  • enum cdx_mcdi_cmd_state(9)
  • struct cdx_mcdi(9)
  • struct cdx_mcdi_iface(9)
  • struct cdx_mcdi_data(9)

Okay bye bestie β€” this page’s source/version is ./include/linux/cdx, dated October 2026. πŸ’œπŸŽ€

πŸ“¦ where this page comes from