From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rich Felker <dalias@libc.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Christoph Hellwig <hch@lst.de>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset
Date: Wed, 02 Sep 2020 15:51:16 +0000 [thread overview]
Message-ID: <CAMuHMdUiPhHtkQfcpMSA6HMvmcFyg__rSGUoHRKQfQf2N5QTYA@mail.gmail.com> (raw)
In-Reply-To: <20200902134418.GR3265@brightrain.aerifal.cx>
Hi Rich,
On Wed, Sep 2, 2020 at 5:43 PM Rich Felker <dalias@libc.org> wrote:
> On Wed, Sep 02, 2020 at 10:31:47AM +0200, Ulf Hansson wrote:
> > On Tue, 1 Sep 2020 at 17:40, Christoph Hellwig <hch@lst.de> wrote:
> > > On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote:
> > > > > I still don't think this makes sense, as the dma_mask should always
> > > > > be non-NULL here.
> > > >
> > > > If that is the case, I wonder how the driver could even have worked without DMA.
> > > >
> > > > Because in the existing code, host->dma_dev gets assigned to
> > > > spi->master->dev.parent->dma_mask - which seems to turn on the DMA
> > > > usage in the driver.
> > > >
> > > > What am I missing?
> > >
> > > Do you know of other non-DMA users? For SH nommu it probably worked
> >
> > I don't know of other non-DMA users. As I said, I wish someone could
> > step in and take better care of mmc_spi - as I know it's being used a
> > lot.
> >
> > > because SH nommu used to provide a DMA implementation that worked
> > > fine for streaming maps, but was completely broken for coherent
> > > allocation. And this driver appears to only use the former.
> >
> > Alright, so you are saying the DMA support may potentially never have
> > been optional to this driver. In any case, I can remove the check in
> > $subject patch, as it shouldn't matter.
>
> DMA support was always optional, because even on systems where DMA is
> present, it doesn't necessarily mean the SPI controller uses DMA. In
> particular, pure bit-banged SPI via GPIOs doesn't have DMA, but has
> always worked. See my previous reply to Christoph about host->dma_dev
> for my current-best understanding of what's going on here.
>
> > Anyway, let's see what Rich thinks of this. I am curious to see if the
> > patch works on his SH boards - as I haven't been able to test it.
>
> I'll rebuild and retest just to confirm, but I already tested a
> functionally equivalent patch that just did the #ifdef inline (rather
> than moving the logic out to separate functions) and it worked fine.
Hence, Tested-by? ;-)
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2020-09-02 15:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 15:04 [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset Ulf Hansson
2020-09-01 15:06 ` Christoph Hellwig
2020-09-01 15:36 ` Ulf Hansson
2020-09-01 15:40 ` Christoph Hellwig
2020-09-02 8:31 ` Ulf Hansson
2020-09-02 13:44 ` Rich Felker
2020-09-02 15:51 ` Geert Uytterhoeven [this message]
2020-09-03 0:41 ` Rich Felker
2020-09-03 8:10 ` Ulf Hansson
2020-09-02 13:34 ` Rich Felker
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=CAMuHMdUiPhHtkQfcpMSA6HMvmcFyg__rSGUoHRKQfQf2N5QTYA@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=broonie@kernel.org \
--cc=dalias@libc.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).