[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG2=9p8ELyjbOx1Ez2LExpYA4bDh_2RcD68e0EV0DHpaPwjXPg@mail.gmail.com>
Date: Wed, 7 Nov 2018 10:56:16 +0800
From: Chunyan Zhang <zhang.chunyan@...aro.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-mmc@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>,
Kishon Vijay Abraham I <kishon@...com>,
Sekhar Nori <nsekhar@...com>, Lyra Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH RFC 1/3] mmc: sdhci: add support for using external DMA devices
On Tue, 6 Nov 2018 at 19:16, Arnd Bergmann <arnd@...db.de> wrote:
>
> On 11/5/18, Chunyan Zhang <zhang.chunyan@...aro.org> wrote:
> > Some standard SD host controller can support both external dma
> > controllers as well as ADMA in which the controller acts as
> > DMA master.
> >
> > Currently the generic SDHCI code supports ADMA/SDMA integrated into
> > 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 a generic DMA controller with SDHCI.
> >
> > Signed-off-by: Chunyan Zhang <zhang.chunyan@...aro.org>
>
> Looks good to me overall, but I think I found one small bug:
>
>
> > + dma->rx_chan = dma_request_chan(mmc->parent, "rx");
> > + if (IS_ERR(dma->rx_chan)) {
> > + ret = PTR_ERR(dma->rx_chan);
> > + if (ret == -EPROBE_DEFER && dma->tx_chan)
> > + dma_release_channel(dma->tx_chan);
> > +
> > + dma->rx_chan = NULL;
> > + pr_warn("Failed to request RX DMA channel.\n");
> > + }
>
> The error handling looks wrong here: if you get EPROBE_DEFER,
> you want to skip the warning message. If you get any other error code,
Right, will address.
> you want the warning message and also the dma_release_channel()
> which should be unconditional here.
Will address.
Thanks for the review,
Chunyan
>
> Arnd
Powered by blists - more mailing lists