From: Pierre Ossman <drzeus@drzeus.cx>
To: Andres Salomon <dilinger@queued.net>
Cc: akpm@linux-foundation.org, drzeus-sdhci@drzeus.cx,
sdhci-devel@list.drzeus.cx, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [OLPC] sdhci: add quirk for the Marvell CaFe's interrupt timeout
Date: Fri, 27 Jun 2008 19:30:01 +0200 [thread overview]
Message-ID: <20080627193001.5925f664@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20080623101352.3bbaf5b0@xo-debian>
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
On Mon, 23 Jun 2008 10:13:52 -0400
Andres Salomon <dilinger@queued.net> wrote:
>
> The CaFe chip has a hardware bug that ends up with us getting a timeout
> value that's too small, causing the following sorts of problems:
>
> [ 60.525138] mmcblk0: error -110 transferring data
> [ 60.531477] end_request: I/O error, dev mmcblk0, sector 1484353
> [ 60.533371] Buffer I/O error on device mmcblk0p2, logical block 181632
> [ 60.533371] lost page write due to I/O error on mmcblk0p2
>
> Presumably this is an off-by-one error in the hardware. Incrementing
> the timeout count value that we stuff into the TIMEOUT_CONTROL register
> gets us a value that works. This bug was originally discovered by
> Pierre Ossman, I believe.
>
> [thanks to Robert Millan for proving that this was still a problem]
>
> Signed-off-by: Andres Salomon <dilinger@debian.org>
Hmm... I'm not entirely sure about the specifics of the workaround
here. It's likely that we'll have an off-by-minus-one in another
controller, and off-by-two in a third.
Perhaps we should just have "broken timeout" and set the timeout to
0xE. It doesn't cause any side-effects except that the user will have
to wait slightly longer for requests to fail if the card has decided to
crap out.
> @@ -479,6 +482,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
> break;
> }
>
> + /*
> + * Compensate for an off-by-one error in the CaFe hardware; otherwise,
> + * a too-small count gives us interrupt timeouts.
> + */
Same issue with "CaFE" as the previous patch.
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-06-27 17:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 14:13 Andres Salomon
2008-06-24 0:04 ` Andrew Morton
2008-06-24 0:08 ` Andrew Morton
2008-06-24 1:38 ` Andres Salomon
2008-06-24 1:40 ` Andres Salomon
2008-06-27 17:30 ` Pierre Ossman [this message]
2008-06-27 17:42 ` Andres Salomon
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=20080627193001.5925f664@mjolnir.drzeus.cx \
--to=drzeus@drzeus.cx \
--cc=akpm@linux-foundation.org \
--cc=dilinger@queued.net \
--cc=drzeus-sdhci@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=sdhci-devel@list.drzeus.cx \
/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
all inboxes | Powered by JetHome®