LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Akhil R <akhilrajeev@nvidia.com>
Cc: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	Krishna Yarlagadda <kyarlagadda@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	Rajesh Gumasta <rgumasta@nvidia.com>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	Pavan Kunapuli <pkunapuli@nvidia.com>
Subject: Re: [PATCH v6 2/4] dmaengine: tegra: Add tegra gpcdma driver
Date: Thu, 23 Sep 2021 13:22:16 +0100	[thread overview]
Message-ID: <5a3de015-a0d1-4440-12d0-06297ac7f9d0@nvidia.com> (raw)
In-Reply-To: <BN9PR12MB5273F667288F7DEE99BA275DC0A29@BN9PR12MB5273.namprd12.prod.outlook.com>


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

  reply	other threads:[~2021-09-23 12:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 14:11 [PATCH v6 0/4] Add Nvidia Tegra GPC-DMA driver Akhil R
2021-09-17 14:11 ` [PATCH v6 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-17 14:11 ` [PATCH v6 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-17 15:36   ` Jon Hunter
2021-09-22 14:46     ` Akhil R
2021-09-23 12:22       ` Jon Hunter [this message]
2021-09-23 12:51         ` Akhil R
2021-09-23 13:20           ` Jon Hunter
2021-09-17 14:11 ` [PATCH v6 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-17 14:11 ` [PATCH v6 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-23  7:51 ` [PATCH v7 0/4] Add Nvidia Tegra GPC-DMA driver Akhil R
2021-09-23  7:51   ` [PATCH v7 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-23 22:35     ` Jon Hunter
2021-09-23  7:51   ` [PATCH v7 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-23 23:27     ` Jon Hunter
2021-09-23  7:51   ` [PATCH v7 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-23  7:51   ` [PATCH v7 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-23 23:20     ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a3de015-a0d1-4440-12d0-06297ac7f9d0@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kyarlagadda@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pkunapuli@nvidia.com \
    --cc=rgumasta@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@kernel.org \
    --subject='Re: [PATCH v6 2/4] dmaengine: tegra: Add tegra gpcdma driver' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).