lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 2/4] dmaengine: tegra: Add tegra gpcdma driver
From
Date

On 22/09/2021 15:46, Akhil R wrote:
>
>> On 17/09/2021 15:11, Akhil R wrote:
>>> +static int tegra_dma_slave_config(struct dma_chan *dc,
>>> + struct dma_slave_config *sconfig) {
>>> + struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
>>> +
>>> + if (tdc->dma_desc) {
>>> + dev_err(tdc2dev(tdc), "Configuration not allowed\n");
>>> + return -EBUSY;
>>> + }
>>> +
>>> + memcpy(&tdc->dma_sconfig, sconfig, sizeof(*sconfig));
>>> + if (tdc->slave_id == -1)
>>> + tdc->slave_id = sconfig->slave_id;
>>> +
>>> + tdc->config_init = true;
>>> + return 0;
>>> +}
>>
>> So you have a function to reserve a slave ID, but you don't check here if it is
>> already reserved.
> slave-id is reserved considering the direction as well.
> 'direction' is available only during prep_slave_sg function, I guess.

Sorry I don't understand what you mean by that.

Jon

--
nvpublic

\
 
 \ /
  Last update: 2021-09-23 14:23    [W:0.081 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site