From patchwork Mon Jun 19 09:36:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 9795599 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 12C726020B for ; Mon, 19 Jun 2017 09:36:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A55727480 for ; Mon, 19 Jun 2017 09:36:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F18B27E5A; Mon, 19 Jun 2017 09:36:55 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 B9C6D27480 for ; Mon, 19 Jun 2017 09:36:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753599AbdFSJgx (ORCPT ); Mon, 19 Jun 2017 05:36:53 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35321 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbdFSJgw (ORCPT ); Mon, 19 Jun 2017 05:36:52 -0400 Received: by mail-wm0-f68.google.com with SMTP id d64so15779056wmf.2 for ; Mon, 19 Jun 2017 02:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=e3h+7xllRv4Se337GoXrNMCIddH8MK6AvQ/Bu+/QHXU=; b=R0oOHwP5s5eWQiSkZUzSziGKVRkPoR0hJVULHjsFWNPZquaWosEgJAiBJggTESrasq sLH6zIXq6Rj+qUzVYRAICdH7/rsy3zbZtYa/0CbZLxnSjFRPmvrCnnNZWIRrHzgnHyv9 YDykAwXAMd4rNRLjmC+uY9jsvoBEfRlave3hXFMgZaat1mAYaAMfS3Pn66iYL8g8ONYb EudC6c7aQGLrThRX61Wo8AP6Yz+5zVNQ8Dycc4cBHKvzjbnbBxDGdcHVtzwR82NqEQDg twRIpTQslac/ZM3+GtZiI4S3sbBdcb4hPww7C180kUcOfzZzokOtbq2pWnGVWw1LHwxl R76w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=e3h+7xllRv4Se337GoXrNMCIddH8MK6AvQ/Bu+/QHXU=; b=EOXCzKDRSPfI8qOmW5NvZExYzGnTGyoUKz0FzZAcMGWrrs2PYSNfZqFAwktDvekBcC vgajgrsk377UyHCuo9rwYSlj100UWRlUaA+7yWAubVycetw+mXDLSrP1CqIGInj6JxuB LN4xXAtVg37gp+4FvBfc/e8Q+eMGh1wGgi7KGCdofhWtfw25IdT3McwTMQcXYzMcrCaj Ftvhjx1m6s3Zeb2Jo+KcB3p91k+26iAAWz63Lm5P3dGARN+j4lNxyfLwBILJUI/gy1Xk L0Xo1ftYqXtiGxUDqJ2pQtm3ovnowNuh7YCsViZiLEdwM7aq0YlQlWrVO8yAuXNj7262 lPqw== X-Gm-Message-State: AKS2vOwwui6lhlUEc1gT78qR+TRCqX4rQbN+/wachvI/Acp22VmROh1n Xb8PrduhzPQM32nq X-Received: by 10.28.69.91 with SMTP id s88mr15155723wma.104.1497865011248; Mon, 19 Jun 2017 02:36:51 -0700 (PDT) Received: from localhost.localdomain (cpc99254-seac26-2-0-cust416.7-2.cable.virginm.net. [86.7.141.161]) by smtp.gmail.com with ESMTPSA id r142sm7120733wmg.24.2017.06.19.02.36.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 02:36:50 -0700 (PDT) From: Will Newton X-Google-Original-From: Will Newton To: linux-omap@vger.kernel.org Cc: Will Newton Subject: [PATCH] omap_hsmmc: Reduce max_segs Date: Mon, 19 Jun 2017 10:36:44 +0100 Message-Id: <20170619093644.16054-1-willn@resin.io> X-Mailer: git-send-email 2.9.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reduce max_segs to a value that allows allocation of an entire descriptor list within a single page. This avoids doing a higher order GFP_ATOMIC allocation when setting up a transfer which can potentially fail and lead to I/O failures. Signed-off-by: Will Newton --- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 1438a72..d5f42d9 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2864,9 +2864,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->use_adma = true; } - /* Since we do only SG emulation, we can have as many segs - * as we want. */ - mmc->max_segs = 1024; + /* Set this to a value that allows allocating an entire descriptor + list within a page (zero order allocation). */ + mmc->max_segs = 64; mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */