From patchwork Mon Dec 22 12:12:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 5527301 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 25DB9BEEA8 for ; Mon, 22 Dec 2014 12:19:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64C022010C for ; Mon, 22 Dec 2014 12:19:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D28A200F3 for ; Mon, 22 Dec 2014 12:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482AbaLVMTr (ORCPT ); Mon, 22 Dec 2014 07:19:47 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:53384 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754401AbaLVMTq (ORCPT ); Mon, 22 Dec 2014 07:19:46 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGZ00CMNGWXJN00@mailout4.samsung.com> for linux-mmc@vger.kernel.org; Mon, 22 Dec 2014 21:19:45 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.49]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id F1.AA.11124.16C08945; Mon, 22 Dec 2014 21:19:45 +0900 (KST) X-AuditID: cbfee68e-f79b46d000002b74-88-54980c617b74 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D2.AE.20081.16C08945; Mon, 22 Dec 2014 21:19:45 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NGZ00D8BGVL9860@mmp2.samsung.com>; Mon, 22 Dec 2014 21:19:45 +0900 (KST) From: Alim Akhtar To: linux-mmc@vger.kernel.org Cc: chris@printf.net, ulf.hansson@linaro.org, jh80.chung@samsung.com, tgih.jun@samsung.com, dianders@chromium.org, alim.akhtar@gmail.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/3] mmc: dw_mmc: fix the max_blk_count in IDMAC Date: Mon, 22 Dec 2014 17:42:02 +0530 Message-id: <1419250324-11743-2-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.2.0 In-reply-to: <1419250324-11743-1-git-send-email-alim.akhtar@samsung.com> References: <1419250324-11743-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsVy+t8zQ91EnhkhBgc/8VksvVVtMeHydkaL s8sOslnc+NXGarHp8TVWiyP/+xktPty/yGxxfG24A4fH7IaLLB47Z91l97hzbQ+bx+Yl9R43 Xi1k8ujbsorR4/MmuQD2KC6blNSczLLUIn27BK6MbVOvsxRc4qqY9HgzawPjJ44uRk4OCQET ifW3WpggbDGJC/fWs3UxcnEICSxjlOj585sNpmjelGksEInpjBIN/14xQzgTmCRmXPjIAlLF JqAtcXf6FrBRIgKyEj//XAAbxSywiVFixeefrCAJYQFnif1tuxi7GDk4WARUJRpfmICEeQXc JU4tP8wIsU1OYsutR+wgNqeAh8TlOQ/AZgoB1Tzfcx1ssYTAOnaJA7vuMIMkWAQEJL5NPsQC MlMCaPGmA8wQcyQlDq64wTKBUXgBI8MqRtHUguSC4qT0IiO94sTc4tK8dL3k/NxNjJAI6NvB ePOA9SFGAQ5GJR7ehIzpIU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HT9KvEL1FTY+1yrU3Lx5/Y/iL+926vA5ZX1dcC57xtbl Oyaa1O3pUreO6E2qMjL/Psv5cYne4bcMAjK3J3f2zX1r3rqL2VpH+0DGBR+Pinf8SizFGYmG WsxFxYkADdmJLsUCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Seungwon Jeon Even though 1MB is reserved for descriptor table in IDMAC, the dw_mmc host driver is allowed to receive only maximum 128KB block length in one request. This is caused by setting improper max_blk_count. It needs to be e adjusted so that descriptor table is used fully. It is found that the performance is improved with the increased the max_blk_count. Signed-off-by: Seungwon Jeon Acked-by: Jaehoon Chung Signed-off-by: Alim Akhtar --- drivers/mmc/host/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 64ea042..a1b80e5 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2332,9 +2332,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) #ifdef CONFIG_MMC_DW_IDMAC mmc->max_segs = host->ring_size; mmc->max_blk_size = 65536; - mmc->max_blk_count = host->ring_size; mmc->max_seg_size = 0x1000; - mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count; + mmc->max_req_size = mmc->max_seg_size * host->ring_size; + mmc->max_blk_count = mmc->max_req_size / 512; #else mmc->max_segs = 64; mmc->max_blk_size = 65536; /* BLKSIZ is 16 bits */