STRUCT MPT3_DIAG_QUERY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mpt3_diag_query(9) πŸ’–

okay so bestie, welcome to the kernel API manual β€” this one is struct mpt3_diag_query, and its whole job is querying relevant info associated with diag buffers. that's the vibe. now let me introduce you to the whole friend group:

  • @hdr β€” the generic header πŸŽ€
  • @reserved β€” (literally nothing else to say about it, it's reserved, leave it alone πŸ™ˆ)
  • @buffer_type β€” specifies either TRACE, SNAPSHOT, or EXTENDED ✨
  • @application_flags β€” misc flags
  • @diagnostic_flags β€” specifies flags affecting command processing
  • @product_specific β€” product specific information
  • @total_buffer_size β€” diag buffer size in bytes
  • @driver_added_buffer_size β€” size of extra space appended to end of buffer
  • @unique_id β€” unique id associated with this buffer

✨ SYNOPSIS ✨

struct mpt3_diag_query {
    struct mpt3_ioctl_header hdr;
    uint8_t reserved;
    uint8_t buffer_type;
    uint16_t application_flags;
    uint32_t diagnostic_flags;
    uint32_t product_specific[MPT3_PRODUCT_SPECIFIC_DWORDS];
    uint32_t total_buffer_size;
    uint32_t driver_added_buffer_size;
    uint32_t unique_id;
 };

🫢 Members 🫢

like, the members!! the cast!! see the roster up top in the NAME section, they're all there πŸ’…


🌸 Description 🌸

so here's the tea, bestie β˜• β€” the application will send only buffer_type and unique_id. that's it, that's the whole ask.

then the driver does its little investigation: it inspects unique_id first, and if that's valid, it fills in all the info. slay πŸ’…

but if unique_id is 0x00? then the driver will return info specified by Buffer Type instead. iconic behaviour, no cap ✨


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/scsi/mpt3sas/mpt3sas_ctl.h, plus the whole entourage:

  • struct mpt3_ioctl_header(9)
  • struct mpt3_ioctl_diag_reset(9)
  • struct mpt3_ioctl_pci_info(9)
  • struct mpt3_ioctl_iocinfo(9)
  • struct mpt3_ioctl_eventquery(9)
  • struct mpt3_ioctl_eventenable(9)
  • struct MPT3_IOCTL_EVENTS(9)
  • struct mpt3_ioctl_eventreport(9)
  • struct mpt3_ioctl_command(9)
  • struct mpt3_ioctl_btdh_mapping(9)
  • struct mpt3_diag_register(9)
  • struct mpt3_diag_unregister(9)
  • struct mpt3_diag_release(9)
  • struct mpt3_diag_read_buffer(9)
  • struct mpt3_addnl_diag_query(9)
  • struct mpt3_enable_diag_sbr_reload(9)
  • struct mpt3_passthru_command(9)

πŸ’€ fr fr bestie, don't forget: unique_id gets checked before anything else. that's the main character of this struct, periodt.

okay that's the whole page!! mwah 🫢 this came from ./drivers/scsi/mpt3sas, dated October 2026, and it's filed under struct mpt3_diag_query(9) β€” go be iconic with it πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from