From: Matt Fleming <matt@console-pimps.org>
To: Cliff Brake <cliff.brake@gmail.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: mmc_spi and flash cards
Date: Sat, 02 Jan 2010 14:17:51 +0000 [thread overview]
Message-ID: <m3d41slhf4.fsf@phlog.console-pimps.org> (raw)
In-Reply-To: <f96d234e0912280958u559c41e6yd47eea5526b6cbda@mail.gmail.com>
On Mon, 28 Dec 2009 12:58:28 -0500, Cliff Brake <cliff.brake@gmail.com> wrote:
>
> >> STOP_TRANSMISSION
> >> bit 3 -> R1_SPI_COM_CRC (the CRC of the last command failed)
>
> mmc0: req done (CMD18): 0: 00000000 00000000 00000000 00000000
> mmc0: 4096 bytes transferred: 0
> mmc0: (CMD12): -84: 00000008 00000000 00000000 00000000
>
That's weird.
> mmc_spi spi1.0: mmc_spi: CMD12, resp R1B
> mmc_spi spi1.0: ... CMD12 response SPI_R1B: resp 0040 00000000
>
> >> bit 6, R1_SPI_PARAMETER (commands argument, block length) was out of allowed range for this card.
>
And that just seems completely bogus; the STOP_TRANSMISSION command
doesn't require any parameters.
Having read mmc_spi_response_get() I'm wondering if it's actually trying
to interpret a busy signal as a response code. Would you mind giving
this patch a go and seeing if the BUG_ON() triggers?
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index d55fe4f..3e36ff4 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -310,6 +310,7 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
checkstatus:
bitshift = 0;
+ BUG_ON(*cp == 0xff);
if (*cp & 0x80) {
/* Houston, we have an ugly card with a bit-shifted response */
rotator = *cp++ << 8;
next prev parent reply other threads:[~2010-01-02 14:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 15:57 mmc_spi and flash cards Cliff Brake
2009-12-28 17:58 ` Cliff Brake
2010-01-02 14:17 ` Matt Fleming [this message]
2010-01-14 21:09 ` Cliff Brake
2010-01-19 20:49 ` Matt Fleming
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=m3d41slhf4.fsf@phlog.console-pimps.org \
--to=matt@console-pimps.org \
--cc=cliff.brake@gmail.com \
--cc=linux-mmc@vger.kernel.org \
/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