From patchwork Wed Dec 2 18:47:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 551668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 063EE140180 for ; Thu, 3 Dec 2015 05:48:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nelint.com header.i=@nelint.com header.b=eTf2h9NY; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 04D2A4BAAD; Wed, 2 Dec 2015 19:47:57 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CKMJrTD71Qci; Wed, 2 Dec 2015 19:47:57 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 374664BAA6; Wed, 2 Dec 2015 19:47:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A15A64BAA6 for ; Wed, 2 Dec 2015 19:47:54 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TvDg467ffBAY for ; Wed, 2 Dec 2015 19:47:54 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by theia.denx.de (Postfix) with ESMTPS id 1A5C24BA9D for ; Wed, 2 Dec 2015 19:47:50 +0100 (CET) Received: by pacdm15 with SMTP id dm15so48076916pac.3 for ; Wed, 02 Dec 2015 10:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nelint.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=Xrg6lDWhlOAnHQa+ErpVToQRw7n3Xnleq7ajPfNrplc=; b=eTf2h9NYQ1N2Jaby54Z1tOvAMhlDuIiVrTNU/M5bvFLT1TIK8AgkddCHqcxhgCp+hL uTSNRqo9qcFWGO4QA0Zxk8DM8APeC6x30C1SpNbwOWIzTwq7U9G2AdyeGXdzGPloAzQB GWr+Al6ELCn2TvkJW7Ok0TeSOy+xHwLm4M6sU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=Xrg6lDWhlOAnHQa+ErpVToQRw7n3Xnleq7ajPfNrplc=; b=JSM2k8hepeswrbZVfwRSYx7suNPyDwo57TAxMBcmO4MO4X9vbJJxLZMJCxJI/2O+po cvSXNV1dPdcqwYK7UpuTKVVRQkecWBv7kTbm2cMBoUpU9KKE/bakUpzurQjaCLlRLQNg 2vMhLbi6ZtNH/4DVyzaJe+K95MjRVDFjXdvDwnYCVrsWS4DQiPWztVM+S8YAXwBGFhVs j0vsYQVX/NThj6hZBtZ2Vb4ZHekJ1u4l3Z6g2yYJEDnFaXLcc1w7sha0laicTaaoN7RS 17HH7Rwy3ZyiZyZnmUP7Xh2s35ewvU//ZBw9iTt+Vu2Kyd4pGx1qlbZpPaesWxG9GeYE GXBQ== X-Gm-Message-State: ALoCoQlf3SCvFDOfXoKgXEYcQWNumK0HVJdgMh6PyQT5ZfA68DX4azepsaljhp0e/MXMgIm5X1O4 X-Received: by 10.98.11.133 with SMTP id 5mr6943777pfl.26.1449082069396; Wed, 02 Dec 2015 10:47:49 -0800 (PST) Received: from [192.168.2.184] (ip98-165-107-234.ph.ph.cox.net. [98.165.107.234]) by smtp.gmail.com with ESMTPSA id wh10sm5844767pab.2.2015.12.02.10.47.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 10:47:48 -0800 (PST) To: Fabio Estevam References: <5620E3A7.7040909@defengcorp.com> <5624CEC5.8040901@digi.com> <52F917CEA1B9C64C94833D53889D478C269236@dor-sms-xch01.digi.com> <565DEF80.90204@nelint.com> From: Eric Nelson Message-ID: <565F3CD3.1010100@nelint.com> Date: Wed, 2 Dec 2015 11:47:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Cc: Cliff Brust , U-Boot-Denx , "Palacios, Hector" , "fabio.estevam@freescale.com" Subject: Re: [U-Boot] mmc erase fails from U-Boot command line X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hi Fabio, On 12/02/2015 10:23 AM, Fabio Estevam wrote: > Hi Eric, > > On Tue, Dec 1, 2015 at 5:05 PM, Eric Nelson wrote: > >> I've also recently seen this on two different custom boards. Both are >> running i.MX6Q TO1.2 and both are using eMMC from Micron. > > One colleague of mine tested eMMC erasure on a mx6qsabresd revC5 board > with a eMMC from Micron and it worked fine. > > So far I see: > > revB and revC5: works > revC2 and revC4: don't work > We're seeing this pretty intermittently and only with certain devices from the same batch, so I'm not sure I'd conclude that the problem won't happen on revB or revC5. >> >> The code which is generating the error message: >> >> http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/fsl_esdhc.c;h=c5054d66bdcda029f0485958c87bd5154ccee591;hb=HEAD#l390 >> >> Seems to refer to an errata for the i.MX35 (ENGcm03648): >> http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdf >> >> I don't see any reference to the errata in the i.MX6 docs. > > This piece of code came from: > 7a5b80297bc6cef ("mmc: fsl_esdhc: Poll until card is not busy anymore") > > Yes, ENGcm03648 is not listed in mx6 errata document. > >> Ignoring the error (removing the return statement) seems to leave things >> in a workable state, so I suspect the problem isn't with an insufficient >> timeout. > > May I see your change, please? > Sure. It's a hack, but shows where we're hitting the problem (with the stop command). We haven't been using the "mmc erase" command, but see this when using ums to program eMMC. Regards, Eric From e647278657e32f74833eadc5f2cbe4d121c22842 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 17 Nov 2015 15:35:32 -0700 Subject: [PATCH] mmc: try to continue after failure in stop command --- drivers/mmc/mmc.c | 3 +-- drivers/mmc/mmc_write.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 2a58702..53084a7 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -225,9 +225,8 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start, cmd.resp_type = MMC_RSP_R1b; if (mmc_send_cmd(mmc, &cmd, NULL)) { #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) - printf("mmc fail to send stop cmd\n"); + printf("%s: mmc fail to send stop cmd\n", __func__); #endif - return 0; } } diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index 7aea7e9..a417d25 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -153,8 +153,7 @@ static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, cmd.cmdarg = 0; cmd.resp_type = MMC_RSP_R1b; if (mmc_send_cmd(mmc, &cmd, NULL)) { - printf("mmc fail to send stop cmd\n"); - return 0; + printf("%s: mmc fail to send stop cmd\n", __func__); } } -- libgit2 0.21.2