From patchwork Mon Jun 8 13:40:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 49629 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C02A3214B2 for ; Mon, 8 Jun 2015 13:51:13 +0000 (UTC) Received: by laar3 with SMTP id r3sf20776434laa.3 for ; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=qHifQgkl1SkDiXkflXnZ2rOlTDqrkEU5a7LlfnbHLcA=; b=i/iRt/b2UBr0OcNjWJ+RfvhKG+T/A1LT4FRnAqleD8IAsiejBuA8UmrP6YFHgLyxD+ AxBacNVPKde3LNjp6HJQTHBHxn8jvpBtjXKynuO//ZCFts9HQiKFXxUBcVdsJ3s2tB09 G6zI/NkbOaBpFrrK1U96GaCBBRAF1qtb8lDnxwZOB5OU/N4EmLQ9gmU2oyB71KT3UEGo dJy0AggJHZFfV5T1OqGa/0fadsmMNXvOt4jLzeHkEKo6znrMQYKx3LitlfMUH/0llNoJ JOMlSkQ78b7qxlNLZm1SzS/VLbUA4AD4H7Piqet4gVX66FlDBg/FT41sUtQRSLyjFTLI oDEA== X-Gm-Message-State: ALoCoQkW52n6bmYHzqQU8kppCJd0oGwyAMMh1LlS24QOe5c+u5mYLntZWRaPveZacAhl2C2mOVRy X-Received: by 10.194.5.229 with SMTP id v5mr17233325wjv.0.1433771472739; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.133 with SMTP id kq5ls628550lac.102.gmail; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) X-Received: by 10.152.37.37 with SMTP id v5mr16553841laj.11.1433771472601; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id y10si2768770lal.136.2015.06.08.06.51.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2015 06:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laar3 with SMTP id r3so48366453laa.3 for ; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) X-Received: by 10.112.41.196 with SMTP id h4mr16904708lbl.36.1433771472513; Mon, 08 Jun 2015 06:51:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1879874lbb; Mon, 8 Jun 2015 06:51:11 -0700 (PDT) X-Received: by 10.66.102.103 with SMTP id fn7mr29930384pab.85.1433771065100; Mon, 08 Jun 2015 06:44:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ig4si4189681pbb.82.2015.06.08.06.44.23; Mon, 08 Jun 2015 06:44:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbbFHNoS (ORCPT + 2 others); Mon, 8 Jun 2015 09:44:18 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:22534 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbbFHNnp (ORCPT ); Mon, 8 Jun 2015 09:43:45 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t58DhiR3009537 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Jun 2015 13:43:44 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t58DhhGe003301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 8 Jun 2015 13:43:43 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t58Dhhtm003453; Mon, 8 Jun 2015 13:43:43 GMT Received: from lappy.hsd1.nh.comcast.net (/10.159.178.227) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 08 Jun 2015 06:43:43 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: sasha.levin@oracle.com Subject: [PATCH 3.18 042/178] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Date: Mon, 8 Jun 2015 09:40:33 -0400 Message-Id: <1433770969-2003-43-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1433770969-2003-1-git-send-email-sasha.levin@oracle.com> References: <1433770969-2003-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Grygorii Strashko [ Upstream commit 184af16b09360d6273fd6160e6ff7f8e2482ef23 ] 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(). Fixes: 4c2ef25fe0b8 (mmc: fix all hangs related to mmc/sd card...) Signed-off-by: Grygorii Strashko Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- 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 f26a5f1..297b4f9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2615,6 +2615,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);