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: 47454 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 42ABA20553 for ; Thu, 23 Apr 2015 10:43:58 +0000 (UTC) Received: by lbcne10 with SMTP id ne10sf3125312lbc.1 for ; Thu, 23 Apr 2015 03:43:57 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=54EVLKEhTSQ4hUsqeXeHgqgI+TIbjPQspIP3ylx5vko=; b=ZgK3S1V64Y8YIqrmv4ZrPlERInNXjmAFQaUFHGoOJFhClmFkCbPkGtF41gOHZvuskK SrQr7xje7429zFYSvka4UzOIYELcNqPD1EcmaSG46cb45BTedpjjolyy4AYj9Q2D45WL PtX2GM4hgcdA5YobWCrY+IUPRAFv13M0niw78Ue/fzbPsmpT4m7OubjyR0vu+AERH8VB 49Xb1Ix8JPIAKxuOXBoq74Sn4LwzYTzMYagbjQPHbmsoQmfCF9khzMUrGUCyYx2R7PEu IeyAL3jSiCAT4DePiYp0jxQhHAVINLBorOBmjmh5EAZdPRGKlrMU20NrLXqgBWwMNnIH hHcw== X-Gm-Message-State: ALoCoQmmEWrXAlUwDDt1bsGZQ4GjQfvWU2J8jTKDY0l48OpqAQW2oNHcg0egaDC0zq9h1ybfVrkL X-Received: by 10.180.11.101 with SMTP id p5mr1308336wib.3.1429785837146; Thu, 23 Apr 2015 03:43:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.194 with SMTP id v2ls359286lag.59.gmail; Thu, 23 Apr 2015 03:43:57 -0700 (PDT) X-Received: by 10.152.43.43 with SMTP id t11mr1852182lal.74.1429785836986; Thu, 23 Apr 2015 03:43:56 -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 d9si5723830lah.23.2015.04.23.03.43.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 03:43:56 -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 lagv1 with SMTP id v1so9580946lag.3 for ; Thu, 23 Apr 2015 03:43:56 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr126444lbc.19.1429785836903; Thu, 23 Apr 2015 03:43:56 -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.67.65 with SMTP id l1csp486426lbt; Thu, 23 Apr 2015 03:43:56 -0700 (PDT) X-Received: by 10.66.66.225 with SMTP id i1mr4213550pat.30.1429785835035; Thu, 23 Apr 2015 03:43:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si11929548pdc.102.2015.04.23.03.43.54; Thu, 23 Apr 2015 03:43:55 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933428AbbDWKnx (ORCPT + 11 others); Thu, 23 Apr 2015 06:43:53 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:33913 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756393AbbDWKnv (ORCPT ); Thu, 23 Apr 2015 06:43:51 -0400 Received: by laat2 with SMTP id t2so9620701laa.1 for ; Thu, 23 Apr 2015 03:43:50 -0700 (PDT) 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-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@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 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);