From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Fri, 4 Dec 2015 09:35:23 -0700 Subject: [U-Boot] mmc erase fails from U-Boot command line In-Reply-To: References: <5620E3A7.7040909@defengcorp.com> <5624CEC5.8040901@digi.com> <52F917CEA1B9C64C94833D53889D478C269236@dor-sms-xch01.digi.com> <565DEF80.90204@nelint.com> <565F3CD3.1010100@nelint.com> <565F4674.8010306@nelint.com> Message-ID: <5661C0CB.2040900@nelint.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Fabio, On 12/02/2015 12:53 PM, Fabio Estevam wrote: > On Wed, Dec 2, 2015 at 5:28 PM, Eric Nelson wrote: > ... >> >> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c >> index 53084a7..8f5d9e1 100644 >> --- a/drivers/mmc/mmc.c >> +++ b/drivers/mmc/mmc.c >> @@ -105,6 +105,9 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd >> *cmd, struct mmc_data *data) >> #else >> ret = mmc->cfg->ops->send_cmd(mmc, cmd, data); >> #endif >> + if (ret) >> + printf("error %d from CMD_SEND:%d\n", ret, cmd->cmdidx); >> + >> return ret; > > Applying this change on top of head I get: > > => mmc erase 4000 1000 > > MMC erase: dev # 2, block # 16384, count 4096 ... Timeout waiting for DAT0 to go > high! > error -19 from CMD_SEND:38 > mmc erase failed > 0 blocks erased: ERROR How easy is this for you to reproduce? I'm only seeing the error sporadically, which makes it difficult to test.