From patchwork Fri Dec 10 07:40:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 397692 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBA7eb8s026514 for ; Fri, 10 Dec 2010 07:40:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329Ab0LJHkg (ORCPT ); Fri, 10 Dec 2010 02:40:36 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35114 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753274Ab0LJHkf (ORCPT ); Fri, 10 Dec 2010 02:40:35 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 3AD6C867E2; Fri, 10 Dec 2010 08:40:34 +0100 (CET) Date: Fri, 10 Dec 2010 08:40:31 +0100 Message-ID: From: Takashi Iwai To: "Rafael J. Wysocki" Cc: Chris Ball , Maxim Levitsky , Oliver Neukum , Andrew Morton , Pavel Machek , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mmc: Fix re-probing after hibernation In-Reply-To: <201012092137.24603.rjw@sisk.pl> References: <1291821839-15088-1-git-send-email-tiwai@suse.de> <20101209015303.GB19741@void.printf.net> <201012092137.24603.rjw@sisk.pl> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 07:40:37 +0000 (UTC) === From: Takashi Iwai Subject: [PATCH] mmc: Fix re-probing with PM_POST_RESTORE notification In the error-path where PM notifies PM_POST_RESTORE, the rescan-blockage should be cleared as well. Otherwise it'll be never re-probed. Also, as a bonus, this fixes a bug in S4 with user-mode suspend in the current code, as it sends PM_POST_RESTORE instead of PM_POST_HIBERNATION wrongly. Cc: Signed-off-by: Takashi Iwai --- drivers/mmc/core/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 31ae07a..57dcf8f 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1773,6 +1773,7 @@ int mmc_pm_notify(struct notifier_block *notify_block, case PM_POST_SUSPEND: case PM_POST_HIBERNATION: + case PM_POST_RESTORE: spin_lock_irqsave(&host->lock, flags); host->rescan_disable = 0;