linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Chunyan Zhang <zhang.chunyan@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	kishon@ti.com, nsekhar@ti.com
Subject: Re: [PATCH v2 1/3] mmc: sdhci: add support for using external DMA devices
Date: Thu, 29 Nov 2018 12:48:13 +0200	[thread overview]
Message-ID: <d9091e09-da8d-5fd2-0957-30d34c2a0e21@intel.com> (raw)
In-Reply-To: <CAAfSe-sfe5A7b_8iBiUmvi_mo1zRZ_Oh0yu-uwXo8Hv+WBftWQ@mail.gmail.com>

On 29/11/18 11:59 AM, Chunyan Zhang wrote:
> Hi Adrian,
> 
> On Thu, 29 Nov 2018 at 15:36, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>
>> On 29/11/18 8:22 AM, Chunyan Zhang wrote:
>>> On Tue, 20 Nov 2018 at 21:41, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>>>
>>>> On 12/11/18 9:26 AM, Chunyan Zhang wrote:
>>>>> Some standard SD host controllers can support both external dma
>>>>> controllers as well as ADMA/SDMA in which the SD host controller
>>>>> acts as DMA master. TI's omap controller is the case as an example.
>>>>>
>>>>> Currently the generic SDHCI code supports ADMA/SDMA integrated in
>>>>> the host controller but does not have any support for external DMA
>>>>> controllers implemented using dmaengine, meaning that custom code is
>>>>> needed for any systems that use an external DMA controller with SDHCI.
>>>>
>>>> I still think you probably need to reset the DMA if there are transfer
>>>> errors - perhaps you could comment on that.  Also there are some comments below.
>>>
>>> With regard to "transfer error", do you mean if
>>> sdhci_external_dma_setup() failed?
>>
>> No, I mean any error interrupt that can leave the DMA uncompleted.  For
>> SDHCI, resetting the data circuit cleans that up, but presumably something
>> is needed for external DMA?
> 
> Yes, it should need a dmaengine_terminate_all().
> 
> How about adding that at here (I will wrap it up of course):
> https://elixir.bootlin.com/linux/v4.19.5/source/drivers/mmc/host/sdhci.c#L2553

Yes except we really need to reverse
	if (host->flags & SDHCI_REQ_USE_DMA) {
	}
	if (sdhci_needs_reset(host, mrq)) {
	}
so that we do not unmap before killing the dma

Perhaps you could send that as a separate patch.

> Is there somewhere else I'm missing?

Testing ;-)

  reply	other threads:[~2018-11-29 10:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  7:26 [PATCH v2 0/3] Add support for using external dma in SDHCI Chunyan Zhang
2018-11-12  7:26 ` [PATCH v2 1/3] mmc: sdhci: add support for using external DMA devices Chunyan Zhang
2018-11-20 13:39   ` Adrian Hunter
2018-11-29  6:22     ` Chunyan Zhang
2018-11-29  7:35       ` Adrian Hunter
2018-11-29  9:59         ` Chunyan Zhang
2018-11-29 10:48           ` Adrian Hunter [this message]
2018-11-30  1:15           ` Shawn Lin
2018-12-03 10:47             ` Chunyan Zhang
2018-11-29  6:07   ` [PATCH V3 " Chunyan Zhang
2018-11-29  9:23     ` Adrian Hunter
2018-11-29  9:44       ` Chunyan Zhang
2018-11-29 10:39         ` Adrian Hunter
2018-11-29 10:46           ` Chunyan Zhang
2018-12-03  9:03       ` Faiz Abbas
2018-12-03 10:46         ` Chunyan Zhang
2018-12-03 12:15     ` Faiz Abbas
2018-12-03 13:58       ` Faiz Abbas
2018-12-04  3:11         ` Chunyan Zhang
2018-11-12  7:26 ` [PATCH v2 2/3] mmc: sdhci-omap: Add using external dma Chunyan Zhang
2018-12-03 13:50   ` Faiz Abbas
2018-12-04  3:01     ` Chunyan Zhang
2018-11-12  7:26 ` [PATCH v2 3/3] dt-bindings: sdhci-omap: Add example for " Chunyan Zhang
2018-11-21 11:47 ` [PATCH v2 0/3] Add support for using external dma in SDHCI Faiz Abbas
2018-11-28 16:58   ` Rizvi, Mohammad Faiz Abbas
2018-11-29  6:14     ` Chunyan Zhang

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=d9091e09-da8d-5fd2-0957-30d34c2a0e21@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=ulf.hansson@linaro.org \
    --cc=zhang.chunyan@linaro.org \
    --cc=zhang.lyra@gmail.com \
    /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 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).