From: Andy Gross <agross@codeaurora.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-spi@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Kumar Gala <galak@codeaurora.org>,
Sagar Dharia <sdharia@codeaurora.org>,
Daniel Sneddon <dsneddon@codeaurora.org>
Subject: Re: [PATCH v2] spi: qup: Add DMA capabilities
Date: Tue, 24 Feb 2015 16:38:40 -0600 [thread overview]
Message-ID: <20150224223840.GA21310@qualcomm.com> (raw)
In-Reply-To: <54ECA216.306@linaro.org>
On Tue, Feb 24, 2015 at 06:08:54PM +0200, Stanimir Varbanov wrote:
<snip>
>
> yes, there is a potential race between atomic_inc and dma callback. I
> reordered these calls to save few checks, and now it returns to me.
>
> I imagine few options here:
>
> - reorder the dmaengine calls and atomic operations, i.e.
> call atomic_inc for rx and tx channels before corresponding
> dmaengine_submit and dmaengine_issue_pending.
>
> - have two different dma callbacks and two completions and waiting for
> the two.
This is probably the better solution. The only thing you'll have to take into
consideration is that you may not have a RX DMA transactions.
>
> - manage to receive only one dma callback, i.e. the last transfer in
> case of presence of the rx_buf and tx_buf at the same time.
You use separate channels for the RX and TX, so as long as you have separate
callbacks, it shouldnt be a problem.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-02-24 22:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 13:00 [PATCH v2] spi: qup: Add DMA capabilities Stanimir Varbanov
2015-02-24 13:00 ` Stanimir Varbanov
2015-02-24 13:56 ` Mark Brown
[not found] ` <20150224135622.GH6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-24 16:08 ` Stanimir Varbanov
2015-02-24 16:08 ` Stanimir Varbanov
2015-02-24 22:38 ` Andy Gross [this message]
2015-02-26 2:33 ` Mark Brown
[not found] ` <20150226023317.GE6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-27 14:46 ` Stanimir Varbanov
2015-02-27 14:46 ` Stanimir Varbanov
[not found] ` <1424782803-13103-1-git-send-email-stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-02-24 16:09 ` Ivan T. Ivanov
2015-02-24 16:09 ` Ivan T. Ivanov
2015-02-24 17:11 ` Ivan T. Ivanov
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=20150224223840.GA21310@qualcomm.com \
--to=agross@codeaurora.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dsneddon@codeaurora.org \
--cc=galak@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sdharia@codeaurora.org \
--cc=stanimir.varbanov@linaro.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.