From patchwork Wed Feb 1 06:49:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3DDA460415 for ; Wed, 1 Feb 2017 06:50:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F4F427E3E for ; Wed, 1 Feb 2017 06:50:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2433D2811C; Wed, 1 Feb 2017 06:50:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFA8627E3E for ; Wed, 1 Feb 2017 06:50:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cYokH-0004Td-NF; Wed, 01 Feb 2017 06:50:21 +0000 Received: from mail-wj0-x243.google.com ([2a00:1450:400c:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYok8-00035H-Kw for linux-amlogic@lists.infradead.org; Wed, 01 Feb 2017 06:50:15 +0000 Received: by mail-wj0-x243.google.com with SMTP id ip10so12134809wjb.1 for ; Tue, 31 Jan 2017 22:49:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=lYE0fL8Em8prHxaKnIM7W0FJhecd2GIOE7m8u4I+2JQ=; b=aBaeYnh+mbTDpT+sArGJoK7AEjJez80IRPDLkpsDDKbbme1RMZS6e6lEgsEmJxnFiC 4OalVP4xU1VlnH1rpWhWlnyXR+OUqilyxk+yCtKwMuYV8bHMDVGP2QHNHTm9ETw0vVOk U+FHBtKeVHcebmyHWXCt/ymAIsKa/xTTBl4rD/YqIMDrKLvsGv0TFx0EtlFQy0r+HOKZ DbjO+IEbynFuS8z8CdQQzKqAvuzoW8PtKA9kTTCAj9wJxKK4y7yQUfAZ6NRKFVB6ebIa OOQTxWGMwhNLIZChCayDE5dy7m8K2yHQFzF+vGey0NbKZdUZtbofUsgm9EJCy1iFfWHv Ldtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=lYE0fL8Em8prHxaKnIM7W0FJhecd2GIOE7m8u4I+2JQ=; b=NHSRKHri9xoH8csiilU+IjVlGOKwaTx+95r5EaVxCr/5zsmU9KDApve32ImG2gvPuO zd7mm9IlmgjzXyrIKtEZDLn2d0Jt3c/o8ty1RRzOtTf5mTOO/zx+p8mwf4dwQQXaZMIz iaDnZfXZQLSE1/QDvTki38Krh0UBgd+oeLpYYAL39nQ97Pzr+vJsgKJbV2g1n8D7ZFWP BqoZelvSpwKvHEA2DvEHufOA+SPxhA6NNefywN7kXP8kE0bXgtNbZJlRGM74HTVoZfdV 5m3JrB5/wXjusWSt2cfLzsHf96MyXJ9GNkxngvo+f3yhCLStmS9kHv6hFvKx0Itk2YEI y5HA== X-Gm-Message-State: AIkVDXJa+qVrDrBdZNsb47ph7ZU1CEnNtNOL3jBs2IsMq8YYRZcd485p/hes30jdgggJtQ== X-Received: by 10.223.149.39 with SMTP id 36mr998257wrs.125.1485931793131; Tue, 31 Jan 2017 22:49:53 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977? (p200300C6EBC56C00C4CBDAB7AB364977.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977]) by smtp.googlemail.com with ESMTPSA id x39sm32311705wrb.3.2017.01.31.22.49.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 22:49:52 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 7/9] mmc: meson-gx: reduce bounce buffer size To: Ulf Hansson , Carlo Caione , Kevin Hilman References: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> Message-ID: <90d34a64-bd3e-dcf2-4c36-5ef4e2ac8666@gmail.com> Date: Wed, 1 Feb 2017 07:49:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170131_225013_117341_FC130AC6 X-CRM114-Status: UNSURE ( 7.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP A bounce buffer of 512K isn't needed as the max request size is 511 * 512 byte. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman --- 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);