From patchwork Thu Apr 23 10:43:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 6261561 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D21779F389 for ; Thu, 23 Apr 2015 10:43:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED4542039C for ; Thu, 23 Apr 2015 10:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0648120394 for ; Thu, 23 Apr 2015 10:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933428AbbDWKnx (ORCPT ); Thu, 23 Apr 2015 06:43:53 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:33913 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756393AbbDWKnv (ORCPT ); Thu, 23 Apr 2015 06:43:51 -0400 Received: by laat2 with SMTP id t2so9620701laa.1 for ; Thu, 23 Apr 2015 03:43:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=h7Qnhp2jxrsQgbA54Md7frMkr2YyQEucUGeNPHwpc1U=; b=QO5jKROt74vkZDxevWYlTtwoVYevKcaD4mqfc64EyHOIWNRhuBDV2dIpNphOx2YNKz sj9oLzPOkCTsrsPbiADugA82zo+FaF4ZGMxxBx8rXKIj9nkl1Y3RFlp6vNaxIEOgifxt ABkL/3BilujICa9a6M3TDiDMOPnNfhdREP9l/RXB5ms9ZrVghxCdmEKV/Wolfpdrc4Ga 0OXAwJGbDFYYUx/UuA/fXc4pZOsP6KKClo1/bFUjERN9cuFJyjwFXSjx8NUDQbmtngIA t1IpvOOCYoQURe9N98w8RWFgXX6hF6/SvwtO63J5mzWT1b0w0ou9r9i0aJUTjsvZRrpf MyRA== X-Gm-Message-State: ALoCoQlGFSVpBSION3xAVUf7+671uc7iA85Ky48Zfdc20Gtbfw9W6+vVBqXKBqjqWzee7iNhFiHf X-Received: by 10.112.199.35 with SMTP id jh3mr1890717lbc.23.1429785830348; Thu, 23 Apr 2015 03:43:50 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id mx10sm1769667lbb.20.2015.04.23.03.43.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 03:43:49 -0700 (PDT) From: To: , Sumit Semwal , Cc: , , linux-arm-kernel@lists.infradead.org, , Grygorii Strashko Subject: [PATCH] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Date: Thu, 23 Apr 2015 13:43:43 +0300 Message-Id: <1429785823-16939-1-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Grygorii Strashko The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(), as result mmc_rescan() could be scheduled and executed at late hibernation restore stages when MMC device is suspended already - which, in turn, will lead to system crash on TI dra7-evm board: WARNING: CPU: 0 PID: 3188 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x258/0x374() 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in User mode during Functional access Hence, add missed PM_RESTORE_PREPARE PM event in mmc_pm_notify(). Signed-off-by: Grygorii Strashko --- drivers/mmc/core/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index c296bc0..92e7671 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2651,6 +2651,7 @@ int mmc_pm_notify(struct notifier_block *notify_block, switch (mode) { case PM_HIBERNATION_PREPARE: case PM_SUSPEND_PREPARE: + case PM_RESTORE_PREPARE: spin_lock_irqsave(&host->lock, flags); host->rescan_disable = 1; spin_unlock_irqrestore(&host->lock, flags);