STRUCT MV_XOR_V2_DESCRIPTOR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mv_xor_v2_descriptor β€” DMA HW descriptor πŸ’…

okay so bestie, you're reading the Kernel API Manual page for struct mv_xor_v2_descriptor, and honestly? it's giving "the actual hardware descriptor, not the vibes version." this is the DMA HW descriptor, periodt. it's a struct. it has fields. some of those fields come with #defines attached, and you're gonna need all of them, so let's go 🌸


✨ SYNOPSIS ✨

struct mv_xor_v2_descriptor {
    u16 desc_id;
    u16 flags;
    u32 crc32_result;
    u32 desc_ctrl;
  #define DESC_NUM_ACTIVE_D_BUF_SHIFT     22;
  #define DESC_OP_MODE_SHIFT              28;
  #define DESC_OP_MODE_NOP                0       ;
  #define DESC_OP_MODE_MEMCPY             1       ;
  #define DESC_OP_MODE_MEMSET             2       ;
  #define DESC_OP_MODE_MEMINIT            3       ;
  #define DESC_OP_MODE_MEM_COMPARE        4       ;
  #define DESC_OP_MODE_CRC32              5       ;
  #define DESC_OP_MODE_XOR                6       ;
  #define DESC_OP_MODE_RAID6              7       ;
  #define DESC_OP_MODE_RAID6_REC          8       ;
  #define DESC_Q_BUFFER_ENABLE            BIT(16);
  #define DESC_P_BUFFER_ENABLE            BIT(17);
  #define DESC_IOD                        BIT(27);
    u32 buff_size;
    u32 fill_pattern_src_addr[4];
    u32 data_buff_addr[MV_XOR_V2_DESC_BUFF_D_ADDR_SIZE];
    u32 reserved[MV_XOR_V2_DESC_RESERVED_SIZE];
 };

like, look at all those defines sitting inside the struct body. they're not members, they're just living there rent-free, and we respect it 🫢


πŸŽ€ Members πŸŽ€

  • desc_id β€” used by S/W and is not affected by H/W. so the software owns this one, no cap, the hardware literally doesn't touch it.
  • flags β€” error and status flags. this is where the drama (i.e. errors) gets reported πŸ‘€
  • crc32_result β€” the CRC32 calculation result lives here.
  • desc_ctrl β€” operation mode and control flags. this is the main character field, lowkey β€” it's the one that carries all those DESC_* defines above ✨
  • buff_size β€” amount of bytes to be processed.
  • fill_pattern_src_addr β€” Fill-Pattern or Source-Address and AW-Attributes. yes, it's doing double duty and it's handling it πŸ’…
  • data_buff_addr β€” Source (and might be RAID6 destination) addresses of data buffers in RAID5 and RAID6.
  • reserved β€” reserved. that's it. that's the whole description. don't touch it πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./drivers/dma/mv_xor_v2.c
  • struct mv_xor_v2_device(9)
  • struct mv_xor_v2_sw_desc(9)

so yeah, go read those too, iykyk πŸ¦‹

this iconic little page came from ./drivers/dma, dated October 2026, and the footer still says struct mv_xor_v2_descriptor(9) because we keep the branding consistent βœ¨πŸ’– bye bestie, go write some descriptors πŸŽ€

πŸ“¦ where this page comes from