From patchwork Tue Sep 15 09:03:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zefan Li X-Patchwork-Id: 53621 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 0E59E22A22 for ; Tue, 15 Sep 2015 09:34:46 +0000 (UTC) Received: by lagj9 with SMTP id j9sf61490073lag.0 for ; Tue, 15 Sep 2015 02:34:45 -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=/WSIF06B3vPSMPfvpedl6vhsNUOUpjZuVvGYltH/3JI=; b=UQCeUMB5uqKp0Yd/NmOWmCpvI83QJvAIaT7Mk5cvFkmaquw8wNO+ppnol1V1qucWMG EeoMg9n6drfydlO0R0Y0g21ihQ5UuIF4vv12VvpMyoqAxOCDo6R2bqpwLfIVkRAt98UC WNRzDyFkQnY/E1DH60tHkS28alpmKKLEEf7LznfB/NuBLZ0I5MoCQB+th7dJOXfAvJ2r VClsgi/jyahJi+WGLLSZqPr3qoQ6LbQAEQ5P/LZc7W58FEAOozffTwyxHVmVDPda0cdL Jr97SnCkyYQlhHcsV0uI23a3dx3wgvScJk+P/aLvVpwpxtDyPclSxDtZ8+R4UMkXquFd Pp5w== X-Gm-Message-State: ALoCoQk1wLGhvR4yKySdW8DS17d3GZDccG9uAn1SzvW+u9Wal0cRIuok6McBzPxtEQHGYNVbDpqs X-Received: by 10.112.202.165 with SMTP id kj5mr4052668lbc.5.1442309685031; Tue, 15 Sep 2015 02:34:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.230 with SMTP id e6ls610311lah.66.gmail; Tue, 15 Sep 2015 02:34:44 -0700 (PDT) X-Received: by 10.152.30.37 with SMTP id p5mr19969219lah.102.1442309684759; Tue, 15 Sep 2015 02:34:44 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id 8si4786477lak.55.2015.09.15.02.34.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 02:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lahg1 with SMTP id g1so73854223lah.1 for ; Tue, 15 Sep 2015 02:34:44 -0700 (PDT) X-Received: by 10.152.21.196 with SMTP id x4mr14021598lae.86.1442309684647; Tue, 15 Sep 2015 02:34:44 -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.59.35 with SMTP id w3csp1677563lbq; Tue, 15 Sep 2015 02:34:43 -0700 (PDT) X-Received: by 10.107.129.205 with SMTP id l74mr32038904ioi.181.1442309683688; Tue, 15 Sep 2015 02:34:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si11194637igm.76.2015.09.15.02.34.43; Tue, 15 Sep 2015 02:34:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S1754974AbbIOJel (ORCPT + 29 others); Tue, 15 Sep 2015 05:34:41 -0400 Received: from mail.kernel.org ([198.145.29.136]:52545 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754286AbbIOJJ3 (ORCPT ); Tue, 15 Sep 2015 05:09:29 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A965520769; Tue, 15 Sep 2015 09:09:28 +0000 (UTC) Received: from localhost.localdomain (unknown [183.247.163.231]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E20820766; Tue, 15 Sep 2015 09:09:26 +0000 (UTC) From: lizf@kernel.org To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Grygorii Strashko , Ulf Hansson , Zefan Li Subject: [PATCH 3.4 073/146] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Date: Tue, 15 Sep 2015 17:03:08 +0800 Message-Id: <1442307861-32031-73-git-send-email-lizf@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442307787-31952-1-git-send-email-lizf@kernel.org> References: <1442307787-31952-1-git-send-email-lizf@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.43 as permitted sender) smtp.mailfrom=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 3.4.109-rc1 review patch. If anyone has any objections, please let me know. ------------------ commit 184af16b09360d6273fd6160e6ff7f8e2482ef23 upstream. 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 [lizf: Backported to 3.4: adjust context] Signed-off-by: Zefan Li --- 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 ba821fe..eef1261 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2370,6 +2370,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;