From: Anderson Briglia <anderson.briglia@indt.org.br>
To: linux-kernel@vger.kernel.org
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Tony Lindgren <tony@atomide.com>
Subject: [patch 5/5] MMC OMAP driver
Date: Tue, 31 Jan 2006 09:39:26 -0400 [thread overview]
Message-ID: <43DF688E.7020805@indt.org.br> (raw)
This patch by Tuukka Tikkanen provides a write work-around for broken
MMC cards that set READY_FOR_DATA when it's not set.
Signed-off-by: Tuukka Tikkanen
Index: linux-2.6.15-mmc_omap/drivers/mmc/Kconfig
===================================================================
--- linux-2.6.15-mmc_omap.orig/drivers/mmc/Kconfig 2006-01-26 17:03:43.000000000 -0400
+++ linux-2.6.15-mmc_omap/drivers/mmc/Kconfig 2006-01-26 17:04:57.000000000 -0400
@@ -29,6 +29,14 @@ config MMC_BLOCK
mount the filesystem. Almost everyone wishing MMC support
should say Y or M here.
+config MMC_BLOCK_BROKEN_RFD
+ boolean "Write work-around for incompatible cards"
+ depends on MMC_BLOCK
+ default n
+ help
+ Say y here if your MMC card fails write operations. Some cards
+ lie about being ready to receive data while they actually are not.
+
config MMC_ARMMMCI
tristate "ARM AMBA Multimedia Card Interface support"
depends on ARM_AMBA && MMC
Index: linux-2.6.15-mmc_omap/drivers/mmc/mmc_block.c
===================================================================
--- linux-2.6.15-mmc_omap.orig/drivers/mmc/mmc_block.c 2006-01-26 17:04:52.000000000 -0400
+++ linux-2.6.15-mmc_omap/drivers/mmc/mmc_block.c 2006-01-26 17:04:57.000000000 -0400
@@ -234,6 +234,13 @@ static int mmc_blk_issue_rq(struct mmc_q
req->rq_disk->disk_name, err);
goto cmd_err;
}
+#ifdef CONFIG_MMC_BLOCK_BROKEN_RFD
+ /* Work-around for broken cards setting READY_FOR_DATA
+ * when not actually ready.
+ */
+ if (R1_CURRENT_STATE(cmd.resp[0]) == 7)
+ cmd.resp[0] &= ~R1_READY_FOR_DATA;
+#endif
} while (!(cmd.resp[0] & R1_READY_FOR_DATA));
#if 0
next reply other threads:[~2006-01-31 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 13:39 Anderson Briglia [this message]
2006-01-31 15:31 ` [patch 5/5] MMC OMAP driver Pierre Ossman
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=43DF688E.7020805@indt.org.br \
--to=anderson.briglia@indt.org.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.