linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] mmc: uniphier-sd: avoid using broken DMA RX channel
Date: Fri, 12 Oct 2018 23:57:38 +0900	[thread overview]
Message-ID: <1539356258-12374-3-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1539356258-12374-1-git-send-email-yamada.masahiro@socionext.com>

host->chan_rx is NULL when UNIPHIER_SD_CAP_BROKEN_DMA_RX quirk flag
is set. In this case, it should not set up DMA.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/mmc/host/uniphier-sd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 10d49aa..1ee9fd0 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -251,6 +251,9 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host,
 	u32 dma_mode;
 	int sg_len;
 
+	if ((data->flags & MMC_DATA_READ) && !host->chan_rx)
+		goto force_pio;
+
 	if (WARN_ON(host->sg_len != 1))
 		goto force_pio;
 
-- 
2.7.4


  parent reply	other threads:[~2018-10-12 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 14:57 [PATCH 0/2] mmc: uniphier-sd: two bug-fixes Masahiro Yamada
2018-10-12 14:57 ` [PATCH 1/2] mmc: uniphier-sd: fix DMA disabling Masahiro Yamada
2018-10-14 22:33   ` Wolfram Sang
2018-10-15 13:15   ` Ulf Hansson
2018-10-12 14:57 ` Masahiro Yamada [this message]
2018-10-14 22:35   ` [PATCH 2/2] mmc: uniphier-sd: avoid using broken DMA RX channel Wolfram Sang
2018-10-15 13:15   ` Ulf Hansson
2018-10-14 22:33 ` [PATCH 0/2] mmc: uniphier-sd: two bug-fixes Wolfram Sang
2018-10-15  3:12   ` Masahiro Yamada
2018-10-15  7:33     ` Wolfram Sang
2018-10-15 12:51       ` Ulf Hansson

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=1539356258-12374-3-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.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 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).