public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Two fixes for my mmc/sd cardreader
@ 2010-06-17 21:21 Maxim Levitsky
  2010-06-17 21:23 ` [PATCH 1/2] MMC: fix all hangs related to mmc/sd card insert/removal during suspend/resume Maxim Levitsky
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Maxim Levitsky @ 2010-06-17 21:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: Andrew Morton, Rafael J. Wysocki, linux-pm, linux-kernel,
	Philip Langdale

Hi,

These are 2 fixes for my card reader.


First patch fixes old issue with system hand on suspend to disk/ram with
mmc card inserted.
I updated description, and pm notification registration order.
I think this patch can an should go to 2.6.35, because it fixes long
standing and nasty regression.

The second patch is a result of my work trying to understand why my card
reader sometimes dies on resume.
This reader has a special MMC function which steals MMC cards, and until
now had no driver. A way to disable it was found, and while it works, it
has (at least here) a side effect of killing the controller on resume
from ram/disk (and it happens often, and doesn't depend of whether card
was in slot or not during suspend).

Fortunately it turned out that MMC part is _almost_ standard SDHCI
controller.
This patch adds support for this device to standard sdhci driver.
Unfortunately, this support still contais small hack.
It waits 1/2 of a second on resume before initializing the controller.
Not doing so, and resuming with MMC card present results in confused
controller. It is not dead though. A card reinsert makes it work again
with all cards.
Yet the 1st patch is must for this because otherwise mmc core seeing
that controller doesn't respond, removes the card, therefore hangs the
system.
It doesn't happen when I wait these 1/2 of second though.

I think that this patch is also ok for 2.6.35, because it only adds new
functionality.
You are free to disable MMC controller using the same
CONFIG_MMC_RICOH_MMC.

If you don't disable it though, instead of full lack of functionality
you will get full featured MMC controller.

Best regards,
Maxim Levitsky




^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH] mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y
@ 2010-08-18 16:25 Randy Dunlap
  0 siblings, 0 replies; 22+ messages in thread
From: Randy Dunlap @ 2010-08-18 16:25 UTC (permalink / raw)
  To: lkml, torvalds, Uwe Kleine-König
  Cc: Maxim Levitsky, David Brownell, Alan Stern, linux-mmc,
	Andrew Morton

From: Uwe Kleine-König  <u.kleine-koenig@pengutronix.de>

This fixes a build breakage introduced by

	4c2ef25 (mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume)

Cc: David Brownell <david-b@pacbell.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-mmc@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

---
 drivers/mmc/core/host.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

There have been 3 patches like this posted, but no one is pushing it
for merging...


diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 0efe631..d80cfdc 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -86,7 +86,9 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
 	init_waitqueue_head(&host->wq);
 	INIT_DELAYED_WORK(&host->detect, mmc_rescan);
 	INIT_DELAYED_WORK_DEFERRABLE(&host->disable, mmc_host_deeper_disable);
+#ifdef CONFIG_PM
 	host->pm_notify.notifier_call = mmc_pm_notify;
+#endif
 
 	/*
 	 * By default, hosts do not support SGIO or large requests.
-- 
1.7.1

--

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

end of thread, other threads:[~2010-08-18 16:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 21:21 [PATCH] Two fixes for my mmc/sd cardreader Maxim Levitsky
2010-06-17 21:23 ` [PATCH 1/2] MMC: fix all hangs related to mmc/sd card insert/removal during suspend/resume Maxim Levitsky
2010-06-21 20:04   ` Adrian Hunter
2010-06-21 20:14     ` Maxim Levitsky
2010-06-21 20:26       ` Rafael J. Wysocki
2010-06-22  0:03         ` Maxim Levitsky
2010-06-22  9:19           ` Rafael J. Wysocki
2010-06-22 21:17             ` Maxim Levitsky
2010-06-22 21:53               ` Rafael J. Wysocki
2010-06-22 22:20                 ` Andrew Morton
2010-06-23  0:16                   ` Rafael J. Wysocki
2010-06-23  3:08                   ` MMC tree (Was: Re: [PATCH 1/2] MMC: fix all hangs related to mmc/sd card insert/removal during suspend/resume.) Stephen Rothwell
2010-06-23  3:52                     ` Andrew Morton
2010-08-13  9:24   ` [PATCH] mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y Uwe Kleine-König
2010-08-13 10:01     ` Maxim Levitsky
2010-08-16  7:51       ` Maxim Levitsky
2010-08-16  5:28     ` Kukjin Kim
2010-06-17 21:23 ` [PATCH 2/2] mmc: make sdhci work with ricoh mmc controller Maxim Levitsky
2010-06-21 19:21 ` [PATCH] Two fixes for my mmc/sd cardreader Maxim Levitsky
2010-06-21 19:39   ` Andrew Morton
2010-06-21 19:50     ` Maxim Levitsky
  -- strict thread matches above, loose matches on Subject: below --
2010-08-18 16:25 [PATCH] mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox