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: 6261581 Return-Path: X-Original-To: patchwork-linux-omap@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 54CF99F389 for ; Thu, 23 Apr 2015 10:43:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9687B2039D for ; Thu, 23 Apr 2015 10:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 924CE2039C for ; Thu, 23 Apr 2015 10:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751160AbbDWKnx (ORCPT ); Thu, 23 Apr 2015 06:43:53 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:35732 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756494AbbDWKnw (ORCPT ); Thu, 23 Apr 2015 06:43:52 -0400 Received: by lbbuc2 with SMTP id uc2so10031383lbb.2 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=OoYpjAeue3X0Q+pHo9DXSkrdX4+x1MyLwF3g2w0qjF7seH5FiyIAUWzMBazFdRW/Ge 9T4BncmAOPXjTKJJOhKdQ9haIEmXd7Dc+7pVMloAxbXHIv0LBpUI3Lr9qhWlCkQ7Gin7 ZdLVQ7h/KOAMj34zxNt8KEBQSxP1aepPVr3qrtaCie8FmbH/H8sXiWQyOhuJAUO5tWFV NBKrNxvJ2RVXXQNLqd722a9Sui1B4nLhy9a3OnzMPtkrOiTR8rnfwdd6V2U7ADZ2hqNB VZtv5okAzQz1WoFdRKJHlAvfqt/VPgeLr1wvUikhzNWuHGAnItBqcITY8qD+fG98MA3N +bvQ== X-Gm-Message-State: ALoCoQl9qpUUsfktU2wb5oofLQIOiQBxS+Oa8ztn5UFxZrfPVXJ7SbeboPWRU5O1oSPReKIOD6De 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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=unavailable 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);