From patchwork Sat May 16 07:38:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 48593 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 79E6B21411 for ; Sat, 16 May 2015 07:51:09 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf38049953lab.1 for ; Sat, 16 May 2015 00:51:08 -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: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=RN3VQKo0IRjmU/pRFnzJMqOCF6dX//ePAvSxh+RBADw=; b=ex90IuTCfAFC0Ww/hwKIuHgeddB2gZ2f3XDyEzK1ZgOwwgKA0jsHsCQepKPgSSke90 uwvnQAaDWe0pVUtfnv5zGZNSrwlYaKGD6duqhifyCC639tMt8MWRDy19W/gFRcbSf2FP lNfVehKtCllX/hIKGR01UgxLVM3X0YGuv3S2j/qX3hPuvFE2+jqZ1pc66aU6OBhNOWF/ BcicD09szvfXuWD5OChK8Ni/D3Mai2P2HSh5wk0aQHc8dLqjvxcpZPSdMLCIvYqX3Kvd oeWSpvD76pnHh9wKU6fH35dx/uRSGLpgmDB1eBrkpqnwnpTBjPaU1jtpP7TkGc8KE+1Z W5SA== X-Gm-Message-State: ALoCoQkodZIaajCEGtO+plZEkFshZepHp2/fBKwynQUZpP6hm9E5AhyO3dJOD+j+Ln65tldaly3y X-Received: by 10.112.203.168 with SMTP id kr8mr9957753lbc.10.1431762668443; Sat, 16 May 2015 00:51:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls615519lac.21.gmail; Sat, 16 May 2015 00:51:08 -0700 (PDT) X-Received: by 10.152.36.227 with SMTP id t3mr10383305laj.12.1431762668144; Sat, 16 May 2015 00:51:08 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id p1si375885lag.52.2015.05.16.00.51.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 00:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by laat2 with SMTP id t2so152935151laa.1 for ; Sat, 16 May 2015 00:51:07 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr6609954laj.88.1431762667866; Sat, 16 May 2015 00:51:07 -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 hn6csp2546539lbb; Sat, 16 May 2015 00:51:06 -0700 (PDT) X-Received: by 10.70.34.134 with SMTP id z6mr25399787pdi.125.1431762179552; Sat, 16 May 2015 00:42:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si6203239pdr.77.2015.05.16.00.42.58; Sat, 16 May 2015 00:42:59 -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 S934304AbbEPHlJ (ORCPT + 2 others); Sat, 16 May 2015 03:41:09 -0400 Received: from bband-dyn183.178-41-215.t-com.sk ([178.41.215.183]:21808 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934088AbbEPHjD (ORCPT ); Sat, 16 May 2015 03:39:03 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YtWfw-0005II-28; Sat, 16 May 2015 09:38:24 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Grygorii Strashko , Ulf Hansson , Jiri Slaby Subject: [PATCH 3.12 136/142] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Date: Sat, 16 May 2015 09:38:16 +0200 Message-Id: <0111a2cc53d12375c574a56b121954fae852db4d.1431761807.git.jslaby@suse.cz> X-Mailer: git-send-email 2.3.7 In-Reply-To: <70c3d4ae1322b9e9bd7443ef574af5635234a0fa.1431761807.git.jslaby@suse.cz> References: <70c3d4ae1322b9e9bd7443ef574af5635234a0fa.1431761807.git.jslaby@suse.cz> In-Reply-To: References: 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.42 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 3.12-stable 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 Signed-off-by: Jiri Slaby --- 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 bf18b6bfce48..e743d3984d29 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2694,6 +2694,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);