Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754723AbbK0OMC (ORCPT ); Fri, 27 Nov 2015 09:12:02 -0500 Received: from mail-yk0-f182.google.com ([209.85.160.182]:36258 "EHLO mail-yk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754665AbbK0OL7 (ORCPT ); Fri, 27 Nov 2015 09:11:59 -0500 MIME-Version: 1.0 In-Reply-To: <1448556091-502-1-git-send-email-ludovic.desroches@atmel.com> References: <1448556091-502-1-git-send-email-ludovic.desroches@atmel.com> Date: Fri, 27 Nov 2015 15:11:58 +0100 Message-ID: Subject: Re: [PATCH] mmc: sdhci-of-at91: controller is suspended too early From: Ulf Hansson To: Ludovic Desroches Cc: linux-mmc , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Nicolas Ferre Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1691 Lines: 51 On 26 November 2015 at 17:41, Ludovic Desroches wrote: > When calling sdhci_add_host(), the controller is already suspended. It > causes to read 0 in registers. > Increment the device's usage counter before calling sdhci_add_host(), > decrement it after and put it in suspend if it is possible. > > Signed-off-by: Ludovic Desroches > Fixes: "mmc: sdhci-of-at91: add PM support" Thanks, applied for next! Actually I decided to squash this change into the "Fixes commit" itself, thus not breaking bisecting. Kind regards Uffe > --- > drivers/mmc/host/sdhci-of-at91.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c > index 81ab9db..7e7d8f0 100644 > --- a/drivers/mmc/host/sdhci-of-at91.c > +++ b/drivers/mmc/host/sdhci-of-at91.c > @@ -200,6 +200,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) > > sdhci_get_of_property(pdev); > > + pm_runtime_get_noresume(&pdev->dev); > pm_runtime_set_active(&pdev->dev); > pm_runtime_enable(&pdev->dev); > pm_runtime_set_autosuspend_delay(&pdev->dev, 50); > @@ -209,6 +210,8 @@ static int sdhci_at91_probe(struct platform_device *pdev) > if (ret) > goto pm_runtime_disable; > > + pm_runtime_put_autosuspend(&pdev->dev); > + > return 0; > > pm_runtime_disable: > -- > 2.5.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/