From patchwork Tue Jan 31 20:58:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548507 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 1A49D60415 for ; Tue, 31 Jan 2017 21:08:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C2D4280B0 for ; Tue, 31 Jan 2017 21:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00D1D28304; Tue, 31 Jan 2017 21:08:06 +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 D661A280B0 for ; Tue, 31 Jan 2017 21:08:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750828AbdAaVIF (ORCPT ); Tue, 31 Jan 2017 16:08:05 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34863 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbdAaVIE (ORCPT ); Tue, 31 Jan 2017 16:08:04 -0500 Received: by mail-wm0-f65.google.com with SMTP id u63so944285wmu.2 for ; Tue, 31 Jan 2017 13:08:03 -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=QG6/wKygFdjtXxZZPQyHQsdFz3ZJd7hIM35rdn8+nyM=; b=Q7Wp68dDq2yj1XMoxzQUK7qlD6eUm5y9wkU73VKpgZrF5AG1U0D4doSJ4DQv+QJQw/ SFAzUOp0BTmXMbqtSK+zI220yL7nsFK6CDasvfT+2ZxAOhY5WThB/OF1ic2i611I7jEr GWoDZqjOPS/3SyeuTl96pXXm4fQWx70l0dyMER46m1SdBGSMM7fRukUR4wCdt3jaqhFg czcWmi+vm3ZjCFaHgQlNGGvSKaJEufQ8gBZHkX3Gh5F1ACo6AyQIX2TyI4WJbfaZ/lB6 xpPCLDbfQPV/vG+rTqmfOjGfKirmP4UlChDz2YV6h6NiFttc3rM2cPawG5gZ/1OspLuY KTiA== 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=QG6/wKygFdjtXxZZPQyHQsdFz3ZJd7hIM35rdn8+nyM=; b=ClgRISc09ntKvwBiciU+PsfF1rw8vOUX+bl7m2mHlJ9nsUBhxLOfLu4qpPCIxdn+/s v8Igostzzpi9x2OK+4t7fKKQISn6lSIYUoHL2n1i83tv6uu4YTSvMupG3GJH9TFCdiTy ZICIUwo14GwsUzb7iaRyDYVf0IsVRtbGh3e4qcb1VX8Eks7Vm1ujguIwLSC3DBGzlj3Y +sxt+ncCGcbAAciSUQP6M7oQ+5Y0P3ubw/p1GJpgV51BVF16SDjXmK/faRkN2IOrsm/D qpmyv4J28NSZVq7FOfpKfXDJgMRaPmvT010P/b79VQPbdOlpqwhyPNdwt4E4AOAXre2G MJXA== X-Gm-Message-State: AIkVDXJjYhdd0QKxw/rtYqoBw21XiQaVLkxfKYZjM2npchEFML+qK9xqGb1S9q59vKSn9Q== X-Received: by 10.223.175.49 with SMTP id z46mr30451823wrc.84.1485896362530; Tue, 31 Jan 2017 12:59:22 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318? (p200300C6EBC56C00BC31E1D558CDF318.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318]) by smtp.googlemail.com with ESMTPSA id g5sm30300854wrd.0.2017.01.31.12.59.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 12:59:22 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 7/9] mmc: meson-gx: reduce bounce buffer size To: Ulf Hansson References: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@gmail.com> Cc: Carlo Caione , Kevin Hilman , linux-mmc@vger.kernel.org Message-ID: <0ba066dc-1713-61c9-81a3-541cabec9780@gmail.com> Date: Tue, 31 Jan 2017 21:58:50 +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: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@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 --- 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);