[PATCH RESEND] dma: mmp_pdma: add support for residue reporting

Daniel Mack daniel at zonque.org
Wed Apr 16 09:40:22 PDT 2014


On 04/16/2014 06:01 PM, Vinod Koul wrote:
> On Wed, Apr 16, 2014 at 04:59:13PM +0200, Daniel Mack wrote:
>> On 04/16/2014 11:09 AM, Vinod Koul wrote:
>>> On Wed, Apr 16, 2014 at 10:38:10AM +0200, Daniel Mack wrote:
>>>>>> It might add to the readability of the drivers, but for the current
>>>>>> case, I don't think it's really necessary.
>>>>> That is because you are maintaining the current descriptors in chain_running. If
>>>>> we use above method then you dont need to use this, right?
>>>>
>>>> Jup, but that would result in a rewrite of larger parts of the code. The
>>>> concept of hot-linking the two list so there's only one resulting list
>>>> of currently active descriptors is built-in deeply into the driver's
>>>> concept.
>>> Ah I suspected so :)
>>>
>>> I think for now this is fine you can perhaps upgrade this later :)
>>
>> So, do you want me to resend with the minor dma_set_residue() change?
> Yes please...
> 

Ah, just checked again and my call to

	dma_set_residue(txstate, mmp_pdma_residue(chan, cookie));

resolves to ...

static inline void dma_set_residue(struct dma_tx_state *state, u32 residue)
{
        if (state)
                state->residue = residue;
}


So there's no need to check for txstate != NULL on the caller side :)


Thanks,
Daniel




More information about the linux-arm-kernel mailing list