Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965443AbbDVHnx (ORCPT ); Wed, 22 Apr 2015 03:43:53 -0400 Received: from mail-bn1bon0131.outbound.protection.outlook.com ([157.56.111.131]:18662 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932124AbbDVHnv (ORCPT ); Wed, 22 Apr 2015 03:43:51 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; eukrea.com; dkim=none (message not signed) header.d=none; Date: Wed, 22 Apr 2015 15:33:00 +0800 From: Dong Aisheng To: Juergen Borleis CC: , , "Chris Ball" , Ulf Hansson , Shawn Guo , , Subject: Re: [RFC] i.MX25/35/SDHCI: switch off DMA usage Message-ID: <20150422073258.GB25437@shlinux1.ap.freescale.net> References: <201503271152.04348.jbe@pengutronix.de> <20150327114400.GA20277@shlinux1.ap.freescale.net> <201504141142.00237.jbe@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201504141142.00237.jbe@pengutronix.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(24454002)(199003)(189002)(243025005)(51704005)(110136001)(23756003)(85426001)(104016003)(92566002)(46102003)(50466002)(47776003)(50986999)(15975445007)(106466001)(87936001)(83506001)(19580395003)(54356999)(76176999)(4001350100001)(6806004)(77096005)(62966003)(105606002)(2950100001)(77156002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1217;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1217; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:BN3PR0301MB1217;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1217; X-Forefront-PRVS: 0554B1F54F X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2015 07:43:48.3722 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1217 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2949 Lines: 72 On Tue, Apr 14, 2015 at 11:42:00AM +0200, Juergen Borleis wrote: > Hi, > > On Friday 27 March 2015 12:44:03 Dong Aisheng wrote: > > On Fri, Mar 27, 2015 at 11:52:04AM +0100, Juergen Borleis wrote: > > > DMA and the required overhead on very small data blocks seems an > > > expensive operation. Due to erratum ENGCM07207 for i.MX25 and i.MX35 SoCs > > > the support for multiblock transfers is disabled which results into a > > > huge amount of single 512 byte sector transfers and interrupts. This > > > slows down the transmission speed to below 500 kiB/s (even at 50 MHz SD > > > card clock). Using PIO instead of DMA to avoid ENGCM07207 happens and > > > re-enabling multiblock transfers again improve the transmission > > > capability up to about 2.5 MiB/s. > > > > > > I'm still not sure if ENGCM07207 is related to DMA only and can not > > > happen when PIO is used instead. Someone out there with experience > > > regarding this topic? > > > > The errata does not state it's related to DMA only. > > http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdf > > I could double check with our IC guys to confirm it. > > Gentle ping. > Hi Juergen, Got the info from our IC guy. PIO mode is not related to AHB access, so AHB hang is not exist. But, he supposes the incorrect state machine of IP after sending CMD12 should also exist on PIO mode. We may still needs reset the controller after sending CMD12.(Reset before sending CMD12 should also work) BTW the errata already indicates a workaround for AHB hang: "To abort data transfers on the AHB, software can reset the eSDHC by writing 1 to SYSCTL[24] (RSTA)." So the issue could be avoided by reset controller. And the current SDHCI driver already does reset if any error(cmd or data) happens, and current MMC core seems only sending stop command when meets error. (not sending stop during normal transfer). So it looks to me the issue may already be workarounded and can not be reproduced. I'm not sure if anyone really meets the issue. By googling the original post of this patch, it seems the patch owner also did not reproduce this issue. See: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029818.html I would suggest someone who has the MX35/MX25 boards, to run the test again by manually triggering a data error.(e.g: shorting data line to ground during transfer). Then to see if the controller can still work well. If can not reproduce, then we can remove this errata and back to DMA mode. Regards Dong Aisheng > Regards, > Juergen > > -- > Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| Juergen Borleis ? ? ? ? ? ? | > Industrial Linux Solutions ? ? ?| http://www.pengutronix.de/ | -- 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/