* MMC fix for 2.6.38
@ 2011-03-07 23:03 Chris Ball
0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2011-03-07 23:03 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-mmc
Linus,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git for-linus
to fix an SDIO initialization regression introduced in -rc1. Thanks.
The following changes since commit 214d93b02c4fe93638ad268613c9702a81ed9192:
Linus Torvalds (1):
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/.../tmlind/linux-omap-2.6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git for-linus
Dmitry Shmidt (1):
mmc: sdio: Allow sdio operations in other threads during sdio_add_func()
drivers/mmc/core/sdio.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
From: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu, 3 Mar 2011 17:40:10 -0500
Subject: [PATCH] mmc: sdio: Allow sdio operations in other threads during sdio_add_func()
This fixes a bug introduced by 807e8e40673d ("mmc: Fix sd/sdio/mmc
initialization frequency retries") that prevented SDIO drivers from
performing SDIO commands in their probe routines -- the above patch
called mmc_claim_host() before sdio_add_func(), which causes a deadlock
if an external SDIO driver calls sdio_claim_host().
Fix tested on an OLPC XO-1.75 with libertas on SDIO.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Reviewed-and-Tested-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/sdio.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 5c4a54d..ebc62ad 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -792,7 +792,6 @@ int mmc_attach_sdio(struct mmc_host *host)
*/
mmc_release_host(host);
err = mmc_add_card(host->card);
- mmc_claim_host(host);
if (err)
goto remove_added;
@@ -805,12 +804,12 @@ int mmc_attach_sdio(struct mmc_host *host)
goto remove_added;
}
+ mmc_claim_host(host);
return 0;
remove_added:
/* Remove without lock if the device has been added. */
- mmc_release_host(host);
mmc_sdio_remove(host);
mmc_claim_host(host);
remove:
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 2+ messages in thread
* MMC fix for 2.6.38
@ 2011-03-09 16:30 Chris Ball
0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2011-03-09 16:30 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-mmc
Linus,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git for-linus
for a final MMC regression fix against -rc1. Thanks.
The following changes since commit 214d93b02c4fe93638ad268613c9702a81ed9192:
Linus Torvalds (1):
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/.../tmlind/linux-omap-2.6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git for-linus
Ohad Ben-Cohen (1):
mmc: fix CONFIG_MMC_UNSAFE_RESUME regression
drivers/mmc/core/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Tue, 8 Mar 2011 23:32:02 +0200
Subject: [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression
30201e7f3 ("mmc: skip detection of nonremovable cards on rescan")
allowed skipping detection of nonremovable cards on mmc_rescan().
The intention was to only skip detection of hardwired cards that
cannot be removed, so make sure this is indeed the case by directly
checking for (lack of) MMC_CAP_NONREMOVABLE, instead of using
mmc_card_is_removable(), which is overloaded with
CONFIG_MMC_UNSAFE_RESUME semantics.
The user-visible symptom of the bug this patch fixes is that no
"mmc: card XXXX removed" message appears in dmesg when a card is
removed and CONFIG_MMC_UNSAFE_RESUME=y.
Reported-and-tested-by: Dmitry Shmidt <dimitrysh@google.com>
Reported-and-tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 6625c05..150b5f3 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1529,7 +1529,7 @@ void mmc_rescan(struct work_struct *work)
* still present
*/
if (host->bus_ops && host->bus_ops->detect && !host->bus_dead
- && mmc_card_is_removable(host))
+ && !(host->caps & MMC_CAP_NONREMOVABLE))
host->bus_ops->detect(host);
/*
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-09 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 16:30 MMC fix for 2.6.38 Chris Ball
-- strict thread matches above, loose matches on Subject: below --
2011-03-07 23:03 Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox