Received: by 10.223.176.5 with SMTP id f5csp1055772wra; Fri, 2 Feb 2018 10:24:00 -0800 (PST) X-Google-Smtp-Source: AH8x225BW7RLYdfOeiGwUUCh2Y74z4pRIAhScs4lpYYrXXBY9tEW2QulsJmwTS/Bli+p8S4HjaeY X-Received: by 10.99.95.193 with SMTP id t184mr32161298pgb.189.1517595840809; Fri, 02 Feb 2018 10:24:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517595840; cv=none; d=google.com; s=arc-20160816; b=jByyE1x05G1+gCQDqxBNNuxBDlKIrGxGyiYEmTUSUBBE5LlWYSKB8u5BaNJymV4M/A frWgd6r6A3DDIup9dtnEgsf9TNzj7j3MTfNYnmVwo0b0CZwP1iuRjP4oiC0ZJp5zp4to Ld4zKIFdGHDnnbtkNFcnF1yl8Vhb+L7PmtG1voT2xyPB3Dvtb4vpxAArMN+47XVpLg6x pELw67qCX7Dzoo2+V/qobEIuX/6DsWVFQZlOQ4JIbeiWSKZx6TRV8g7s55zKTXS1edPX HE7XQsyrD9339Fjvyk/ETpZH5kg7qtFC/182SBwDsrVJBZ6rXeXfk+EtdRz78WPqJQzN jeXA== 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 :arc-authentication-results; bh=ZEnpgdJHaCgMwsvggkblGnY0Zs5yRAOa632QFtGKDbg=; b=g3YhxnfgC9FG/nOdUR+oFG8mfYfw3kBbII7cJGYOnEgBdU2mDGrCnyNPI2/pbRplD9 Fgv2/5q/wfIAjLmllzxpf0zbd7jbieIQYmzp5aI2qF4KPl1lj8PtpdtA4l+15j88nWrB 5TtVUZ1xNo7wJ8pUHh/9Xrn7nZtvjIh4mnwxSROQOvhVizYOYoEDSm+KbinomwgBFg1H r70LRy+Wp63Z6dhHp8exlrDIgvZxh7zBpatzezX7Xn/yPQ7V+KeKEHJpA5Rqcq2gHBQG IzeET9KdG6aXlW9v9UzumJgRRlM1qsQ7HAT0pdRxOxsnnyQKCHNusmvKvXwujXkypFJh LkPw== 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 e8-v6si2279708pls.595.2018.02.02.10.23.46; Fri, 02 Feb 2018 10:24:00 -0800 (PST) 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 S1754252AbeBBSWs (ORCPT + 99 others); Fri, 2 Feb 2018 13:22:48 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35494 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbeBBRCm (ORCPT ); Fri, 2 Feb 2018 12:02:42 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 536F5DFF; Fri, 2 Feb 2018 17:02:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabio Estevam , Martin Kaiser , Fugang Duan Subject: [PATCH 4.4 66/67] serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS Date: Fri, 2 Feb 2018 17:58:35 +0100 Message-Id: <20180202140822.488256547@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140815.091718203@linuxfoundation.org> References: <20180202140815.091718203@linuxfoundation.org> User-Agent: quilt/0.65 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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fabio Estevam commit 38b1f0fb42f772b8c9aac53593883a18ff5eb9d7 upstream. The wakeup mechanism via RTSDEN bit relies on the system using the RTS/CTS lines, so only allow such wakeup method when the system actually has RTS/CTS support. Fixes: bc85734b126f ("serial: imx: allow waking up on RTSD") Signed-off-by: Fabio Estevam Reviewed-by: Martin Kaiser Acked-by: Fugang Duan Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2057,12 +2057,14 @@ static void serial_imx_enable_wakeup(str val &= ~UCR3_AWAKEN; writel(val, sport->port.membase + UCR3); - val = readl(sport->port.membase + UCR1); - if (on) - val |= UCR1_RTSDEN; - else - val &= ~UCR1_RTSDEN; - writel(val, sport->port.membase + UCR1); + if (sport->have_rtscts) { + val = readl(sport->port.membase + UCR1); + if (on) + val |= UCR1_RTSDEN; + else + val &= ~UCR1_RTSDEN; + writel(val, sport->port.membase + UCR1); + } } static int imx_serial_port_suspend_noirq(struct device *dev)