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: 9548947 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 3563C60415 for ; Wed, 1 Feb 2017 06:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 268BE27E3E for ; Wed, 1 Feb 2017 06:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A1122811C; Wed, 1 Feb 2017 06:49:56 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC38827E3E for ; Wed, 1 Feb 2017 06:49:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751379AbdBAGtz (ORCPT ); Wed, 1 Feb 2017 01:49:55 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:33539 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdBAGty (ORCPT ); Wed, 1 Feb 2017 01:49:54 -0500 Received: by mail-wj0-f195.google.com with SMTP id le4so2744555wjb.0 for ; Tue, 31 Jan 2017 22:49:53 -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=uZHU67eyBmNUWNGgNaCeSkXSrYLK3ECUJihogVZWUwhrrD5/sCJesktNlWhlbgmGwy 7EPkgjHIBWpmwFebcpwg+oliE44iYPN/nf7XJ5grCRoKzUL4XlyGqzX9Cm+zJbYhVv9k aENlMEBif3TonwlhMOL1dQnDfYECnlETYqULTpnFT6gPgQ3BRgFutjwZn1/2ZNvsPhWv Bwup3Gr2/wIiLPWbaEZ2smXuOUPU4pnb6GWeNzQ6YPVv9b/toElV6bP0dt6gW4SXKZk6 CqKVE89AlfFSBTfjqon1e3UZtp7Jf76fKbY7qfVQkNsjoN1t9ajQCFpLF+PUCIxFx1mm W1iw== X-Gm-Message-State: AIkVDXKKDH06s8W7gg6u+KkRFNJft+JlTFRPeQoRJapMkHtVmEGYiWkkO3cM3ZW8C00lEQ== 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> Cc: linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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);