Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2257914imm; Mon, 28 May 2018 04:56:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq7JQz2x0QaWHpZ1Mt3yXMjzy0vgpuOpxBEkWBpfrUdnnK8Xq/UnBynwuNbt8Mohj9BBniA X-Received: by 2002:a17:902:bccc:: with SMTP id o12-v6mr13451441pls.56.1527508606015; Mon, 28 May 2018 04:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527508605; cv=none; d=google.com; s=arc-20160816; b=LI199bKTGBWtligCCAPe4xZ17WsvBzCIhisJeyi0et2xjCzmh2pD65pZZrrCkNoXkI w+ccYFD3IGhgqPRGMQbKJmvsjlBLopLaqULA0ly3rTPn8vrHb7pc+A+fNERqnezlL3s+ RvUyWoBF5x3xNRMtJIe1EsHrjm4eYT7Qm0DimjF9MDbKvsMbXOiuWpZ1aMdMlgBgyaFR jHgAxZtVW999pxa7bNRQawWB9ROrifUcGWP2HE3bb6AjqY0VyrODqVPe/XZKPocCoy8a /TMtvBZq2BOIkMcl2AUtBnOa8AW+oTofels3lvadQwIFoYYWDunCjbgcWCkBJPeN8b1F RY8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=fZkkwLwxzPjDs9gZxxnMWnCilqQYUO24RqZxfLTSNKo=; b=L5fq3eSKfNBnbXElDdX3YLPtS2shl6KKF4r2z7KmU8i7cUHyvdeqOcp+xNZKhS4iq3 iTJx3ui4awtLdQX+A/I1bCz2fBEMx46aVNNkCglOCLzb7pB43yEciDFpj/RQGfHzDdOM M2YFW3jG9pNVgqga5IlFN71eO1ZdSqgOhC8/YeQJxRVZu9EjenVHTl4DgWmIjtKE6Eul eA+KpADlYpdmCCC1Ahp7XVp41B2sNEAZ1m2SAQhwK/5lqGw97RuGlSx1FqiNxoXsUFis mmkZQPqHTPZLfexIcuT9RWf1u+/a60YRa5HEQSk0YVI0bJpmGp8T7neJLvYImP42W+JF VYow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bpeR45a7; 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 e6-v6si23556200pgr.374.2018.05.28.04.56.31; Mon, 28 May 2018 04:56:45 -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; dkim=pass header.i=@kernel.org header.s=default header.b=bpeR45a7; 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 S1423684AbeE1Lzp (ORCPT + 99 others); Mon, 28 May 2018 07:55:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:55894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423600AbeE1LI1 (ORCPT ); Mon, 28 May 2018 07:08:27 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9580206B7; Mon, 28 May 2018 11:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505707; bh=ieKj0gb/zqZQu+sUxRvUfSDZEgQHTJcb8JN9Hb5ys+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bpeR45a7C556D/f/iQdNgwozG9wLxYzmT3AvG6vmBD2zQ/j4nZPbQiv5dZVXZHs0h h8SA0SkE4F/trcy+rZj3oVtVrW5mkmHtYtgiPFqcztsgrt8Y44VTaZlaKjk/uNWlPj jvWYRfEChb4EvMpT7uhwThZbfLK94TN0C1CYBtdA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, RVC test team via Yoshihiro Shimoda , Geert Uytterhoeven , Vinod Koul , Sasha Levin Subject: [PATCH 4.16 082/272] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks Date: Mon, 28 May 2018 12:01:55 +0200 Message-Id: <20180528100248.038168313@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100240.256525891@linuxfoundation.org> References: <20180528100240.256525891@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ Upstream commit 73dcc666d6bd0db56cd556010f93d8f04c1cc70c ] 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 Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/dma/sh/rcar-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1677,8 +1677,8 @@ static const struct dev_pm_ops rcar_dmac * - 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) };