diff mbox

[v2,7/9] mmc: meson-gx: reduce bounce buffer size

Message ID 90d34a64-bd3e-dcf2-4c36-5ef4e2ac8666@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Heiner Kallweit Feb. 1, 2017, 6:49 a.m. UTC
A bounce buffer of 512K isn't needed as the max request size is
511 * 512 byte.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- no changes
---
 drivers/mmc/host/meson-gx-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kevin Hilman Feb. 3, 2017, 6:18 p.m. UTC | #1
Heiner Kallweit <hkallweit1@gmail.com> writes:

> A bounce buffer of 512K isn't needed as the max request size is
> 511 * 512 byte.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>

> ---
> v2:
> - no changes
> ---
>  drivers/mmc/host/meson-gx-mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 883263c5..48ce4ba4 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -785,7 +785,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size;
>  
>  	/* data bounce buffer */
> -	host->bounce_buf_size = SZ_512K;
> +	host->bounce_buf_size = mmc->max_req_size;
>  	host->bounce_buf =
>  		dma_alloc_coherent(host->dev, host->bounce_buf_size,
>  				   &host->bounce_dma_addr, GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 883263c5..48ce4ba4 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -785,7 +785,7 @@  static int meson_mmc_probe(struct platform_device *pdev)
 	mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size;
 
 	/* data bounce buffer */
-	host->bounce_buf_size = SZ_512K;
+	host->bounce_buf_size = mmc->max_req_size;
 	host->bounce_buf =
 		dma_alloc_coherent(host->dev, host->bounce_buf_size,
 				   &host->bounce_dma_addr, GFP_KERNEL);