From patchwork Fri Oct 15 17:10:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 257161 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 o9FH5axM011620 for ; Fri, 15 Oct 2010 17:05:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755657Ab0JORFd (ORCPT ); Fri, 15 Oct 2010 13:05:33 -0400 Received: from void.printf.net ([89.145.121.20]:59521 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755512Ab0JORFc (ORCPT ); Fri, 15 Oct 2010 13:05:32 -0400 Received: from pullcord.laptop.org ([18.85.46.20]) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1P6nil-0001xF-7F; Fri, 15 Oct 2010 18:05:31 +0100 From: Chris Ball To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Sven Neumann , Ohad Ben-Cohen Subject: [GIT PULL] MMC fix for 2.6.36 Date: Fri, 15 Oct 2010 13:10:49 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) MIME-Version: 1.0 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, 15 Oct 2010 17:05:37 +0000 (UTC) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 5db49b1..09eee6d 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1631,6 +1631,19 @@ int mmc_suspend_host(struct mmc_host *host) if (host->bus_ops && !host->bus_dead) { if (host->bus_ops->suspend) err = host->bus_ops->suspend(host); + if (err == -ENOSYS || !host->bus_ops->resume) { + /* + * We simply "remove" the card in this case. + * It will be redetected on resume. + */ + if (host->bus_ops->remove) + host->bus_ops->remove(host); + mmc_claim_host(host); + mmc_detach_bus(host); + mmc_release_host(host); + host->pm_flags = 0; + err = 0; + } } mmc_bus_put(host);