Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753498AbbGAKNt (ORCPT ); Wed, 1 Jul 2015 06:13:49 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48799 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752748AbbGAKNk (ORCPT ); Wed, 1 Jul 2015 06:13:40 -0400 X-AuditID: cbfee68d-f79106d00000728c-56-5593bd51095b Message-id: <5593BD51.5010100@samsung.com> Date: Wed, 01 Jul 2015 19:13:37 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Alexey Brodkin , "ulf.hansson@linaro.org" , "jh80.chung@samsung.com" Cc: "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "tgih.jun@samsung.com" , "arc-linux-dev@synopsys.com" , Vineet Gupta Subject: Re: [PATCH] mmc: dw_mmc: handle data blocks > than 4kB if IDMAC is used References: <1435220707-7250-1-git-send-email-abrodkin@synopsys.com> <1435744933.4689.31.camel@synopsys.com> In-reply-to: <1435744933.4689.31.camel@synopsys.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsWyRsSkQDdw7+RQg7b/5hbrvt5msvixu8ri xq82VovLu+awWRz5389o8eH+RWaL42vDLRpfrWV24PC4c20Pm0ffllWMHlv2f2b0+LxJLoAl issmJTUnsyy1SN8ugSujo3U5S8ElwYru9zNZGxin8HUxcnJICJhIbLy8mRXCFpO4cG89Wxcj F4eQwFJGiRP7FrHBFDU/6IZKLGKU+HBuHSuE84BRou3/YhaQKl4BLYnu03vBbBYBVYlH0zvA utkEdCS2fzvOBGKLCoRJnJnRAVUvKPFj8j0WkEEiArMYJd423ASbyiwwnUniybRrYEcJCwRI HFrcCzZJSCBPYvmNTjCbE+imnYcusXcxc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pkKFOJNSaysSi3Kjy8qzUktPsRoCgyBicxSosn5wHST VxJvaGxiZmRpZG5oYWRsriTOezLfJ1RIID2xJDU7NbUgtQimj4mDU6qBsSLfYMl+RxXfsHPV tQ0qmqtPCT6sj9qX26faLe7oIH1owTMWmwuPlx9Jt1G6VbxyqfUk2QtRxwwv+gpUfbmcNSvU xujz9Q18u5KumJ9a5fGAJX8v958X16pfvfz+7PudlYvy57wLKuGI3iWS071q4cIK6zajt+1t UZci1nLdf9dxfd6y1E/nhJVYijMSDbWYi4oTAX0/iJL/AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2439 Lines: 69 Hi, Alexey. Sorry for reviewing late. i missed this patch. I will check your patch and reply at mailing. Thanks a lot for noticing this. Best Regards, Jaehoon Chung On 07/01/2015 07:02 PM, Alexey Brodkin wrote: > Hi Jaehoon, Seungwon, Ulf, > > On Thu, 2015-06-25 at 11:25 +0300, Alexey Brodkin wrote: >> As per DW MobileStorage databook "each descriptor can transfer up to >> 4kB >> of data in chained mode", moreover buffer size that is put in "des1" >> is >> limited to 13 bits, i.e. for example on attempt to >> IDMAC_SET_BUFFER1_SIZE(desc, 8192) size value that's effectively >> written >> will be 0. >> >> On the platform with 8kB PAGE_SIZE I see dw_mmc gets data blocks in >> SG-list of 8kB size and that leads to unpredictable behavior of the >> SD/MMC controller. >> >> In particular on write to FAT partition of SD-card the controller >> will >> stuck in the middle of DMA transaction. >> >> Solution to the problem is simple - we need to pass large (> 4kB) >> data >> buffers to the controller via multiple descriptors. And that's what >> that change does. >> >> What's interesting I did try original driver on same platform but >> configured with 4kB PAGE_SIZE and may confirm that data blocks passed >> in SG-list to dw_mmc never exeed 4kB limit - that explains why nobody >> ever faced a problem I did. >> >> Signed-off-by: Alexey Brodkin >> Cc: Seungwon Jeon >> Cc: Jaehoon Chung >> Cc: Ulf Hansson >> Cc: arc-linux-dev@synopsys.com >> Cc: linux-kernel@vger.kernel.org >> --- >> drivers/mmc/host/dw_mmc.c | 109 ++++++++++++++++++++++++++++++------ >> ---------- > > I'm wondering if there're any comments on that patch or if it could be > applied? > > It fixes a real problem on systems on 4K PAGE_SIZE so would be good to > have it in upstream. In particular this is the case with ARC AXS board > which made its way in upstream kernel recently. > > Regards, > Alexey-- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/