From: Vinod Koul <vinod.koul@intel.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] dmaengine: shdma: Make dummy shdma_chan_filter() always return false
Date: Wed, 05 Aug 2015 03:30:37 +0000 [thread overview]
Message-ID: <20150805031837.GG11789@localhost> (raw)
On Fri, Jul 10, 2015 at 12:07:25PM +0200, Geert Uytterhoeven wrote:
> If CONFIG_SH_DMAE_BASE (which is required for DMA engine support for
> legacy SH, SH/R-Mobile, and R-Car Gen1, but not for R-Car Gen2) is not
> enabled, but CONFIG_RCAR_DMAC (for R-Car Gen2 DMA engine support) is,
> and the DTS doesn't provide a "dmas" property for a device,
> dma_request_slave_channel_compat() incorrectly succeeds, and returns a
> DMA channel.
>
> However, when trying to use that DMA channel later, it fails with:
>
> rcar-dmac e6700000.dma-controller: rcar_dmac_prep_slave_sg: bad parameter: len=1, id=-22
>
> (Fortunately most drivers can handle this failure, and fall back to
> PIO)
>
> The reason for this is that a NULL legacy filter function is used, which
> actually means "all channels are OK", not "do not match".
> If CONFIG_SH_DMAE_BASE is enabled (like in shmobile_defconfig, which
> supports other SoCs besides R-Car Gen2), shdma_chan_filter() correctly
> returns false, as no available channel on R-Car Gen2 matches a
> shdma-base channel.
> If the DTS does provide a "dmas" property, dma_request_slave_channel()
> succeeds, and legacy filter-based matching is not used.
>
> To fix this, change shdma_chan_filter from being NULL to a dummy
> function that always returns false, like is done on other platforms.
Applied, thanks
--
~Vinod
next reply other threads:[~2015-08-05 3:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 3:30 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-10 10:07 [PATCH] dmaengine: shdma: Make dummy shdma_chan_filter() always return false Geert Uytterhoeven
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=20150805031837.GG11789@localhost \
--to=vinod.koul@intel.com \
--cc=linux-sh@vger.kernel.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