STRUCT MV_XOR_V2_DESCRIPTOR(9)
π 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 thoseDESC_*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
- 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