Received: by 10.223.176.5 with SMTP id f5csp995725wra; Fri, 2 Feb 2018 09:25:36 -0800 (PST) X-Google-Smtp-Source: AH8x227IPUnEyiMVQ5yWwbCBsCcpBOKYEqIg5LRzTzN/Zc81ra4E8zv51j3cJeI8CDqW9DqykPzK X-Received: by 2002:a17:902:b496:: with SMTP id y22-v6mr15274625plr.206.1517592336275; Fri, 02 Feb 2018 09:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592336; cv=none; d=google.com; s=arc-20160816; b=rCI+gvI/8pOw25U9bjXzkwcWyGS01AtxtXzSWI715o59Vif6MRXn/G+iuJhCnN+W0H FWSXANhik238s8aZQUn6deH4QZeGeSLv6eGArVTav9CAGqRHfDIzYNHiL7aWuVVgNhkX dYBmiAXCkvxSPaM/KJQlwUSJ8GiyF4xReKsUYIelduaSprwQHRXzegjkd8EAqrkxH7rs w/nWGGPBs7XcoVNUtzIY3bf7LzSqzTPtaTsTmpYTY4RisVZQ9KT3E2SqB/Te1gogPGBX mf7BpgUT2OnmrruIRB9jTZeV1Wlt9e1K1y3X4GiN9/hjjFkyiprVw2sKpJVMWm3vyHii 9rJg== 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=JdI086tMnWto2Gt+3IkRZAIPnpNz/VoCij34tHrytNI=; b=pGFHG7XUSZcjgpOEF+ooKOjyDQ9EN0YF/L53GJgsUMS32yYTZly6p+1OnbK02Ykw5C Pzv06hXpw68ziFW0qcWS9ug5PofZXxRLOGBR/H9QnUW3/ojUKHEyMhpM2Loaq7Pgo9Uo AltmzljBjGtxQSEPwD1JKoI3IUFGot5jAk4f6cwwAvrWbz+ijiE2/nBk79lzdKuv2NwI IFAbbz/osbxPJyzwcZCRz+Sn1qu8t8bvIa6WKgMOVJjMnRgNM0LYQhgyIZI4nh06tq/6 0Wz5eR7JU4Mn30YhUwkeTZojsziGbss/ttTwS+kFjLQgtJ8lM6jZh48o9hRrixnHxFXl K+Dg== 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 101-v6si2179206ple.263.2018.02.02.09.25.21; Fri, 02 Feb 2018 09:25:36 -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 S1753391AbeBBRYK (ORCPT + 99 others); Fri, 2 Feb 2018 12:24:10 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40370 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753580AbeBBROM (ORCPT ); Fri, 2 Feb 2018 12:14:12 -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 CB998C1C; Fri, 2 Feb 2018 17:13:55 +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.14 149/156] serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS Date: Fri, 2 Feb 2018 17:58:50 +0100 Message-Id: <20180202140847.101104163@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@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.14-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 @@ -2275,12 +2275,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)