All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression
@ 2011-03-08 21:32 Ohad Ben-Cohen
  2011-03-08 21:56 ` Chris Ball
  0 siblings, 1 reply; 3+ messages in thread
From: Ohad Ben-Cohen @ 2011-03-08 21:32 UTC (permalink / raw)
  To: linux-mmc
  Cc: Chris Ball, Dmitry Shmidt, Maxim Levitsky, Ohad Ben-Cohen, stable

30201e7 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.

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>
Cc: <stable@kernel.org>
---
Based on linux-2.6.git master, as this should probably go to Linus.

 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);
 
 	/*
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression
  2011-03-08 21:32 [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression Ohad Ben-Cohen
@ 2011-03-08 21:56 ` Chris Ball
  2011-03-08 22:20   ` Ohad Ben-Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Ball @ 2011-03-08 21:56 UTC (permalink / raw)
  To: Ohad Ben-Cohen; +Cc: linux-mmc, Dmitry Shmidt, Maxim Levitsky, stable

Hi Ohad,

On Tue, Mar 08 2011, Ohad Ben-Cohen wrote:
> 30201e7 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.
>
> 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>
> Cc: <stable@kernel.org>
> ---
> Based on linux-2.6.git master, as this should probably go to Linus.
>
>  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);
>  
>  	/*

Thanks, I will send this to Linus for .38 final.

I have removed the stable@ tag, because the patch causing this
regression was introduced in .38-rc1 -- it has not been part of
any released kernel.  So, as long as we fix it before .38 releases
in a week, there's no need to involve stable@.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression
  2011-03-08 21:56 ` Chris Ball
@ 2011-03-08 22:20   ` Ohad Ben-Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: Ohad Ben-Cohen @ 2011-03-08 22:20 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc, Dmitry Shmidt, Maxim Levitsky, stable

On Tue, Mar 8, 2011 at 11:56 PM, Chris Ball <cjb@laptop.org> wrote:
> I have removed the stable@ tag, because the patch causing this
> regression was introduced in .38-rc1 -- it has not been part of
> any released kernel.  So, as long as we fix it before .38 releases
> in a week, there's no need to involve stable@.

Thanks, Chris.

I misread git describe; v2.6.37-3748-g30201e7 is of course post-2.6.37 material.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-08 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 21:32 [PATCH] mmc: fix CONFIG_MMC_UNSAFE_RESUME regression Ohad Ben-Cohen
2011-03-08 21:56 ` Chris Ball
2011-03-08 22:20   ` Ohad Ben-Cohen

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.