From: Wolfram Sang <wsa@the-dreams.de>
To: linux-mmc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-renesas-soc@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [RFC PATCH] mmc: renesas_sdhi_internal_dmac: fall back to PIO if scatterlist doesn't match
Date: Wed, 4 Apr 2018 19:00:35 +0200 [thread overview]
Message-ID: <20180404170035.5507-1-wsa@the-dreams.de> (raw)
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
If we detect an incompatible scatterlist, we should fall back to PIO,
too.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
I found this while working on the RX DMA issue. I don't see a reason why we
shouldn't fall back in this case as well. But maybe I am missing something.
Shimoda-san: what do you think?
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 380570a26a09..561e90755a3b 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -161,11 +161,7 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
enum dma_data_direction dir;
int ret;
- /* This DMAC cannot handle if sg_len is not 1 */
- WARN_ON(host->sg_len > 1);
-
- /* This DMAC cannot handle if buffer is not 8-bytes alignment */
- if (!IS_ALIGNED(sg->offset, 8))
+ if (WARN_ON(host->sg_len > 1) || !IS_ALIGNED(sg->offset, 8))
goto force_pio;
if (data->flags & MMC_DATA_READ) {
--
2.11.0
next reply other threads:[~2018-04-04 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 17:00 Wolfram Sang [this message]
2018-04-05 7:02 ` [RFC PATCH] mmc: renesas_sdhi_internal_dmac: fall back to PIO if scatterlist doesn't match Ulf Hansson
2018-04-05 16:21 ` Wolfram Sang
2018-04-06 14:07 ` Yoshihiro Shimoda
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=20180404170035.5507-1-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.