From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Possible MMC subsystem bug
Date: Sun, 27 Jan 2013 05:32:12 +0100 [thread overview]
Message-ID: <201301270532.12393.marex@denx.de> (raw)
Hi Andy,
I was going through the MMC code, trying to get Phison 8007 SD-to-NAND bridge
working (don't ask please, this chip's sole existence defies any logic).
So, I found the following code and I was wondering if the following patch is not
needed. Maybe my brain is just giving up though. Give it some thought please and
let me know, thanks!
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 72e8ce6..94926ca 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -475,8 +474,11 @@ static int sd_send_op_cond(struct mmc *mmc)
if (err)
return err;
+ if (!(cmd.response[0] & OCR_BUSY))
+ break;
+
udelay(1000);
- } while ((!(cmd.response[0] & OCR_BUSY)) && timeout--);
+ } while (timeout--);
if (timeout <= 0)
return UNUSABLE_ERR;
next reply other threads:[~2013-01-27 4:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 4:32 Marek Vasut [this message]
2013-01-27 4:44 ` [U-Boot] Possible MMC subsystem bug Fleming Andy-AFLEMING
2013-01-27 4:49 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201301270532.12393.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox