From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
linux-mmc <linux-mmc@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] mmc: sdhci-tegra: Specify valid DMA mask
Date: Fri, 04 Mar 2016 09:38:21 +0100 [thread overview]
Message-ID: <27028474.SJJak25cUc@wuerfel> (raw)
In-Reply-To: <CAAVeFuLEXB1uLgzbvTy207z5Dh6LST7DvzTJ5Vtt1JeiStJztg@mail.gmail.com>
On Friday 04 March 2016 15:43:56 Alexandre Courbot wrote:
> >
> > Yeah, I'm not too sure what is the point of setting the fake mask to
> > be honest, but you are definitely right that it is a contradiction to
> > call a DMA function on a device that is not DMA-capable.
>
> Ah, I finally got it - we are just setting it to the *address* of
> host->dma_mask so the device's DMA mask does not end up being a NULL
> pointer.
>
> That actually changes things a bit. DMA-capable devices are clearly
> expected to set the mask themselves, but the only one to do it is
> host/mtk-sd.c. And dma_set_mask() is only called in dw_mmc and
> sdhci-acpi's enable_dma callback.
>
> This means most DMA-capable devices (including Tegra, but not only)
> are simply left with no DMA setup at all.
>
> Probably we can detect when the host did not do any DMA setup in the
> probe function and attempt some sane defaults depending on what the
> hardware says it is capable of?
When the host leaves an empty DMA mask, the intended meaning is
that the device is not on a DMA capable bus, so if we run into
that case, we should instead fix the creation of the device
rather than the driver that looks at the data.
Arnd
prev parent reply other threads:[~2016-03-04 8:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 4:32 [PATCH v2 0/2] mmc: sdhci: Set DMA mask if specified Alexandre Courbot
2016-03-01 4:32 ` [PATCH v2 1/2] mmc: sdhci: Set DMA mask Alexandre Courbot
[not found] ` <1456806764-16467-2-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-01 21:30 ` Arnd Bergmann
2016-03-04 6:09 ` Alexandre Courbot
[not found] ` <1456806764-16467-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-01 4:32 ` [PATCH v2 2/2] mmc: sdhci-tegra: Specify valid " Alexandre Courbot
[not found] ` <1456806764-16467-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-01 21:34 ` Arnd Bergmann
2016-03-02 10:36 ` Alexandre Courbot
[not found] ` <CAAVeFuLqWcjAvCA4Stu=APFt0_jY6C=HiFfLiUnx=_W5Mj9gQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02 11:25 ` Arnd Bergmann
2016-03-04 6:08 ` Alexandre Courbot
2016-03-04 6:43 ` Alexandre Courbot
2016-03-04 8:38 ` Arnd Bergmann [this message]
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=27028474.SJJak25cUc@wuerfel \
--to=arnd@arndb.de \
--cc=acourbot@nvidia.com \
--cc=gnurou@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox