[2/2] mmc: uniphier-sd: avoid using broken DMA RX channel
diff mbox series

Message ID 1539356258-12374-3-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series
  • mmc: uniphier-sd: two bug-fixes
Related show

Commit Message

Masahiro Yamada Oct. 12, 2018, 2:57 p.m. UTC
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(+)

Comments

Wolfram Sang Oct. 14, 2018, 10:35 p.m. UTC | #1
On Fri, Oct 12, 2018 at 11:57:38PM +0900, Masahiro Yamada wrote:
> 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>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Ulf Hansson Oct. 15, 2018, 1:15 p.m. UTC | #2
On 12 October 2018 at 16:57, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 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>

Applied for next, thanks!

Kind regards
Uffe


> ---
>
>  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
>

Patch
diff mbox series

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;