+ mmc-when-rescanning-cards-check-existing-cards-after-mmc_setup.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     MMC: When rescanning cards check existing cards after mmc_setup()

has been added to the -mm tree.  Its filename is

     mmc-when-rescanning-cards-check-existing-cards-after-mmc_setup.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: MMC: When rescanning cards check existing cards after mmc_setup()
From: Timo Teras <timo.teras@xxxxxxxxxxxxx>

Some broken cards seem to process CMD1 even in stand-by state.  The result
is that the card replies with ILLEGAL_COMMAND error for the next command
sent after rescanning.  Currently the next command is select card, which
would return the error.  But the CMD7 does actually succeed and retries of
the command will timeout.  The solution is to poll card status after the
CMD1 which clears the cached error.

Signed-off-by: Timo Teras <timo.teras@xxxxxxxxxxxxx>
Cc: Pierre Ossman <drzeus-list@xxxxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/mmc/mmc.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -puN drivers/mmc/mmc.c~mmc-when-rescanning-cards-check-existing-cards-after-mmc_setup drivers/mmc/mmc.c
--- a/drivers/mmc/mmc.c~mmc-when-rescanning-cards-check-existing-cards-after-mmc_setup
+++ a/drivers/mmc/mmc.c
@@ -1178,14 +1178,17 @@ static void mmc_rescan(void *data)
 {
 	struct mmc_host *host = data;
 	struct list_head *l, *n;
+	unsigned char power_mode;
 
 	mmc_claim_host(host);
 
-	if (host->ios.power_mode == MMC_POWER_ON)
-		mmc_check_cards(host);
+	power_mode = host->ios.power_mode;
 
 	mmc_setup(host);
 
+	if (power_mode == MMC_POWER_ON)
+		mmc_check_cards(host);
+
 	if (!list_empty(&host->cards)) {
 		/*
 		 * (Re-)calculate the fastest clock rate which the
_

Patches currently in -mm which might be from timo.teras@xxxxxxxxxxxxx are

mmc-when-rescanning-cards-check-existing-cards-after-mmc_setup.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux