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: 6261591 Return-Path: X-Original-To: patchwork-linux-arm@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 089BE9F389 for ; Thu, 23 Apr 2015 10:46:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A46320396 for ; Thu, 23 Apr 2015 10:46:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5223F20394 for ; Thu, 23 Apr 2015 10:46:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YlEcE-0000xy-N5; Thu, 23 Apr 2015 10:44:18 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YlEcA-0000tO-IN for linux-arm-kernel@lists.infradead.org; Thu, 23 Apr 2015 10:44:15 +0000 Received: by layy10 with SMTP id y10so9662494lay.0 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=i7Zdg0GSz1qblV8tx9av8Rv3tptymFotmpnjn1E8qd+CihvM1p9hDTDtMK6cCWrtw9 YX/k1Tszf+2wiUexjkmgwCs83E/KUuj+ReYE06SBpMZ6ol2QS15wRLkxDUzLgcnUu3U8 JFLczwDK4RaolxarvLbHpV8t4x6p64xFkeIGrchPiW0M3xdvSxIRj4bTmhZXOL/CyQFY 9X439I0RXgYw2xH0/ctae/N7VqoKHq2oSfYnOJ8eHvSwTKwzt/o300QmVW5j2ikGgINy w5lO5ZwaosrhQ+x5yS8dKHbm9CMnPg5tBu8C2nBwBdHQwDijiSnHjwj0JqaHe8TlHMNV Q9Tg== X-Gm-Message-State: ALoCoQlXc9/RAm9GKgDMXHaUivK6V6noOQ6YjElssOHQEACbBSwpTdZvaW06thoc40Pydymc1k7L 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 , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150423_034414_784859_5D9680F7 X-CRM114-Status: UNSURE ( 8.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: linux-omap@vger.kernel.org, khilman@linaro.org, Grygorii Strashko , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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);