STRUCT CDX_DEV_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct cdx_dev_params β€” CDX device parameters

okay so bestie, welcome to the Kernel API Manual (that's the manpage section 9 vibe, struct cdx_dev_params(9), iykyk) β€” this is where the kernel keeps the whole little profile of a CDX device. Think of it as the device's main character sheet ✨


🌸 NAME 🌸

struct cdx_dev_params β€” literally the CDX device parameters, no cap


✨ SYNOPSIS ✨

struct cdx_dev_params {
    struct cdx_controller *cdx;
    struct device *parent;
    u16 vendor;
    u16 device;
    u16 subsys_vendor;
    u16 subsys_device;
    u8 bus_num;
    u8 dev_num;
    struct resource res[MAX_CDX_DEV_RESOURCES];
    u8 res_count;
    u32 req_id;
    u32 class;
    u8 revision;
    u32 msi_dev_id;
    u32 num_msi;
 };

🫢 like, that's the whole struct. copy it exactly, don't be out here freelancing with the fields bestie.


πŸŽ€ Members πŸŽ€

  • cdx β€” the CDX controller this device is associated with πŸ‘‘ (its ride-or-die)
  • parent β€” the associated CDX Bus device, the parent it belongs to
  • vendor β€” the Vendor ID for the CDX device 🏷️
  • device β€” the Device ID for the CDX device
  • subsys_vendor β€” the Sub vendor ID for the CDX device (yes, a sub vendor, still iconic)
  • subsys_device β€” the Sub device ID for the CDX device
  • bus_num β€” the Bus number for this CDX device 🚌
  • dev_num β€” the Device number for this device
  • res β€” an array of MMIO region entries πŸ“š (it's giving "a whole list of them")
  • res_count β€” the number of valid MMIO regions πŸ”’ β€” so like, how many of those res entries actually count
  • req_id β€” the Requestor ID associated with the CDX device
  • class β€” the Class of the CDX Device πŸŽ“ (it's giving very "what kind of device is this")
  • revision β€” the Revision of the CDX device
  • msi_dev_id β€” the MSI device ID associated with the CDX device
  • num_msi β€” the Number of MSI's supported by the device ⚑
heads up bestie: res_count is the one telling you how many of the res entries are actually valid MMIO regions β€” don't go reading past that, fr fr πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read those, they're all in their own lane and they're lowkey obsessed with each other πŸ’…


✨ that's the whole page, periodt ✨ this lives in ./drivers/cdx and the version vibes are dated October 2026 β€” slay, go write some device code bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from