Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbbGAKPy (ORCPT ); Wed, 1 Jul 2015 06:15:54 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:56781 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbbGAKPs (ORCPT ); Wed, 1 Jul 2015 06:15:48 -0400 Message-ID: <5593BDC3.6040301@synopsys.com> Date: Wed, 1 Jul 2015 15:45:31 +0530 From: Vineet Gupta User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 Newsgroups: gmane.linux.kernel.mmc,gmane.linux.kernel 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="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.226] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2293 Lines: 63 On Wednesday 01 July 2015 03:32 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 s/4K/8k Alexey fat-fingered it seems. ARC cores by default have 8k MMU page size and we saw this issue on ARC SDP boards ! -Vineet > 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-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/