Received: by 10.213.65.68 with SMTP id h4csp1729305imn; Thu, 29 Mar 2018 09:55:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ayTWUidw1CYZSwaz9rUyXcSImGBAqM2vBjFLbLqzMZoDDDJbWpigKl6c72jmBA6RuP3CC X-Received: by 10.101.90.203 with SMTP id d11mr6004420pgt.20.1522342533621; Thu, 29 Mar 2018 09:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522342533; cv=none; d=google.com; s=arc-20160816; b=zgDj/qhBTbfKcMUSodjM8026vy8uCttZ/DexzOecYsZG1QeB+68uI0I+333EKbHlUG 6H0kBOPP62ONuKfaqIUvIWUl1RWXG3U3eTOXZENm25bpz0sLymxXhNqTtVrV0Zw9cSR8 UKPFWoJoXLvMCis7c1VrCddwA8LgVzNEcMCTfsqD32nNuNOiT3+bhAzeUFmxnUlPCV2H BXGwbD21wmUOg3x7T1UjpJFob6NHsUicgAZW5nHP6U6x4v8uQTg7pxd3e+lUtkGM4zIq lB1xHelXOcK5xmJUCaJ6wOeSHiP1CP0lc0Zg6WufAzX4NWWWR4PmuqIGZeR51h/AMR25 zdTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=T1dcBpFlezbYWg8itGJgiyhPrP/euaW/zWo0mPMQ4QA=; b=fr9ZxiMJQEM9hmFPJHeMKr0dWJKw8XXlAhQVOO/j4V4KkP0Vh+pTmH+hJDKavntn7g svSLcBRgaKV8d0FR4/c8fnG0c9qovnR8p/BuMcGUogIMr4yVFLeSDq+afjbhc6N/sX/Q gFrG2md8ZgPnEAtDS2kC9MDBv6f6jPLG7HtUFro/akq+CN8upEVZHVzQmkmgdXI/Fatk VhDqdJeOo7syNHLRrT//uAPZs0OZcn17KD/ngbj0Ir1zPih4PocDPfC4Ry34Yq42vXe/ 2aoeG3jn3WXY6oAorlYhC/eChqYx/CbwBLc0jN5J1LeKZyVlBZIMItb5Y4QMWe7DJ2HE 1E5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si5883935plr.440.2018.03.29.09.55.19; Thu, 29 Mar 2018 09:55:33 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbeC2Qxo (ORCPT + 99 others); Thu, 29 Mar 2018 12:53:44 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:38556 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbeC2Qxm (ORCPT ); Thu, 29 Mar 2018 12:53:42 -0400 Received: from ayla.of.borg ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id TstZ1x00U3XaVaC06stZQG; Thu, 29 Mar 2018 18:53:40 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1f1ant-0006Iq-IY; Thu, 29 Mar 2018 18:53:33 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1f1ant-0002e0-Go; Thu, 29 Mar 2018 18:53:33 +0200 From: Geert Uytterhoeven To: Vinod Koul Cc: Dan Williams , Ulf Hansson , "Rafael J . Wysocki" , Yoshihiro Shimoda , Kuninori Morimoto , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , dmaengine@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks Date: Thu, 29 Mar 2018 18:53:32 +0200 Message-Id: <1522342412-10126-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If serial console wake-up is enabled ("echo enabled > /sys/.../ttySC0/power/wakeup"), and any serial input is received while the system is suspended, serial port input no longer works after system resume. Note that: 1) The system can still be woken up using the serial console, 2) Serial port input keeps working if the system is woken up in some other way (e.g. Wake-on-LAN or gpio-keys), and no serial input was received while suspended. To fix this, replace SET_LATE_SYSTEM_SLEEP_PM_OPS() by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), as the callbacks installed by the former happen too early resp. late in the suspend resp. resume process. Reported-by: RVC test team via Yoshihiro Shimoda Fixes: 1131b0a4af911de5 ("dmaengine: rcar-dmac: Make DMAC reinit during system resume explicit") Signed-off-by: Geert Uytterhoeven --- This is a fix for a regression introduced in v4.16-rc1. --- drivers/dma/sh/rcar-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index b10bf71ef5ae2b34..386894fa9ecaa2f1 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1686,8 +1686,8 @@ static const struct dev_pm_ops rcar_dmac_pm = { * - Wait for the current transfer to complete and stop the device, * - Resume transfers, if any. */ - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume, NULL) }; -- 2.7.4