RE: [RFC PATCH] mmc: renesas_sdhi_internal_dmac: fall back to PIO if scatterlist doesn't match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram-san,

Thank you for the patch!

> From: Wolfram Sang, Sent: Thursday, April 5, 2018 2:01 AM
> 
> From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> 
> If we detect an incompatible scatterlist, we should fall back to PIO,
> too.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> ---
> 
> 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 */

I would like to keep this comment.

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

As Ulf-san said on other thread about this WARN_ON(),
I think dropping the WARN_ON() is better.

Best regards,
Yoshihiro Shimoda

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux