From patchwork Tue Jun 28 22:04:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 926212 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5SM5VbW024211 for ; Tue, 28 Jun 2011 22:05:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752645Ab1F1WFJ (ORCPT ); Tue, 28 Jun 2011 18:05:09 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:39959 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644Ab1F1WFH (ORCPT ); Tue, 28 Jun 2011 18:05:07 -0400 Received: by wyg8 with SMTP id 8so475932wyg.19 for ; Tue, 28 Jun 2011 15:05:06 -0700 (PDT) Received: by 10.216.145.206 with SMTP id p56mr929154wej.80.1309298706093; Tue, 28 Jun 2011 15:05:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.221.1 with HTTP; Tue, 28 Jun 2011 15:04:46 -0700 (PDT) X-Originating-IP: [46.116.136.221] In-Reply-To: References: From: Ohad Ben-Cohen Date: Wed, 29 Jun 2011 01:04:46 +0300 Message-ID: Subject: Re: -ENOSYS suspend-powerdown regression To: Daniel Drake Cc: linux-mmc@vger.kernel.org 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.6 (demeter2.kernel.org [140.211.167.43]); Tue, 28 Jun 2011 22:05:32 +0000 (UTC) On Wed, Jun 29, 2011 at 12:54 AM, Daniel Drake wrote: > Too many patches floating around, just trying to be sure of what I'm doing! Ok, let's start from fresh :) Let's take 3.0-rc5, it already includes our work: 297c7f2 mmc: sdio: fix runtime PM path during driver removal c6e633a mmc: sdio: reset card during power_restore Then apply these hunks: host->flags |= SDHCI_AUTO_CMD12; I think this should be enough (I don't remember anything else pending). Thanks, Ohad. --- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index d29b9c3..73dc3c2 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -167,11 +167,8 @@ static int sdio_bus_remove(struct device *dev) int ret = 0; /* Make sure card is powered before invoking ->remove() */ - if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) { - ret = pm_runtime_get_sync(dev); - if (ret < 0) - goto out; - } + if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) + pm_runtime_get_sync(dev); drv->remove(func); @@ -191,7 +188,6 @@ static int sdio_bus_remove(struct device *dev) if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) pm_runtime_put_noidle(dev); -out: return ret; } diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 58d5436..ce3e2e2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2488,7 +2488,7 @@ int sdhci_add_host(struct sdhci_host *host) } else mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200; - mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23; + mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_POWER_OFF_CARD; if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)