Re: [PATCH v4 19/25] dmaengine: sdxi: Encode context start, stop, update, and sync descriptors
From: Lynch, Nathan
Date: Tue Nov 17 2026 - 18:00:32 EST
On 11/13/2026 11:17 AM, Frank Li wrote:
> On Tue, Nov 03, 2026 at 08:50:00PM -0600, Nathan Lynch wrote:
>> diff --git a/drivers/dma/sdxi/hw.h b/drivers/dma/sdxi/hw.h
>> index edc43190148c..51b2bcbeca90 100644
>> --- a/drivers/dma/sdxi/hw.h
>> +++ b/drivers/dma/sdxi/hw.h
>> @@ -142,12 +142,89 @@ struct sdxi_desc {
>> #define SDXI_DSC_SE BIT(1)
>> #define SDXI_DSC_FE BIT(2)
>> #define SDXI_DSC_CSR BIT(4)
>> +#define SDXI_DSC_SUBTYPE GENMASK(15, 8)
>> +#define SDXI_DSC_TYPE GENMASK(26, 16)
>>
>> /* For csb_ptr field */
>> +#define SDXI_DSC_NP BIT_ULL(0)
>> #define SDXI_DSC_CSB_PTR GENMASK_ULL(63, 5)
>>
>> +#define define_sdxi_dsc(tag_, name_, op_body_) \
>> + struct tag_ { \
>> + __le32 opcode; \
>> + op_body_ \
>> + __le64 csb_ptr; \
>> + } __packed __aligned(64) name_; \
>> + static_assert(sizeof(struct tag_) == \
>> + sizeof(struct sdxi_dsc_generic)); \
>> + static_assert(offsetof(struct tag_, csb_ptr) == \
>> + offsetof(struct sdxi_dsc_generic, csb_ptr))
>> +
>> + /* SDXI 1.0 Table 6-14: DSC_CXT_START Descriptor Format */
>> + define_sdxi_dsc(sdxi_dsc_cxt_start, cxt_start,
>
> Is indent wrong? suppose define_sdxi_dsc() use previous
> #define define_sdxi_dsc(tag_, name_, op_body_)
I'm not sure what I was going for here; I can make these parts align better.