Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1256619pxa; Thu, 20 Aug 2020 06:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsa+UF9U74VKKLlioFo64edzvFiIX2blx2RgQDIl7bSkUf2Qa5bx/WXBGmN5L85dTwr3yR X-Received: by 2002:a17:906:86c9:: with SMTP id j9mr3319382ejy.5.1597931728639; Thu, 20 Aug 2020 06:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597931728; cv=none; d=google.com; s=arc-20160816; b=MerSetZipLd/+O/Qz1UG46IcrMYUGE92V0P7zyn5V1ETnUOnMwOHkUUhUTyvUDThyA CRuVYbxRTuydHxM+PUxpAKA9e7aEaMt7CtNuy8WjAcbhZYiR9Yu+aKVLWS0RRykGhRQ4 cW/1YkvJSb7rnsiuWBYqnCvNUpFJCdjMMglB9TGbn0GHsEPnXlA6NxWedsGSRqQLVll+ bDlv9dJVg+OtAEGU8+S5Ou7n13MOoA6Uic3LDqjVvbe8VCwf5hyE9xz9Ah20sp7222M9 x0aLHNy2I1tQ9Zu/eQ0qh5egzAoWocGnVtVX1FV1dia+c3rHFbUN11s9DzHRHB2lTf2s znow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=5+zwjFFPcJGxcLpcyvhiQ28fw0dBc0fQ5CZdH97W7/4=; b=Ye3ffvm4ZFWsGBq/OPWsNKsYxfiZpLsMt+SZpxLrkAJ2aLzTM8EFBUepvBaWZ5heG7 no5F3iR0SAEhD+BPUjmLLLj5aZcE/8MRUwmeCPsX5FlHb7YSRkEPtca0ytKi1qxCJxDv 0lzo2S+dY6mZfG2TZNYSuJRephw0qdiRevINOgs+9kG1J8EfTU/4pp26woesIvIgN8pK mHD7FJAJpAfqmlUwrcCrA3Z9/s0Bbv6rNDdc1C335StfHxG87If+J8Xo5GxQ4cs7Ynnk neNXD3U7ZNXTQwRaTmAQmHQ9RbI1L5gHb4dVEqfaF23biKtFazGJaVJRXNkV0NYyuZPG xuZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y23si1212675ejm.712.2020.08.20.06.55.04; Thu, 20 Aug 2020 06:55:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbgHTNwZ (ORCPT + 99 others); Thu, 20 Aug 2020 09:52:25 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:5867 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728987AbgHTNwD (ORCPT ); Thu, 20 Aug 2020 09:52:03 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 20 Aug 2020 06:52:02 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 20 Aug 2020 06:52:00 -0700 Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg02-blr.qualcomm.com with ESMTP; 20 Aug 2020 19:21:35 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 7747A442B; Thu, 20 Aug 2020 19:21:34 +0530 (IST) From: satya priya To: Bjorn Andersson Cc: Matthias Kaehlcke , gregkh@linuxfoundation.org, Andy Gross , Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, akashast@codeaurora.org, rojay@codeaurora.org, msavaliy@qti.qualcomm.com, satya priya Subject: [PATCH V3 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue Date: Thu, 20 Aug 2020 19:21:07 +0530 Message-Id: <1597931467-24268-4-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597931467-24268-1-git-send-email-skakit@codeaurora.org> References: <1597931467-24268-1-git-send-email-skakit@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As a part of system suspend uart_port_suspend is called from the Serial driver, which calls set_mctrl passing mctrl as NULL. This makes RFR high(NOT_READY) during suspend. Due to this BT SoC is not able to send wakeup bytes to UART during suspend. Include if check for non-suspend case to keep RFR low during suspend. Signed-off-by: satya priya Acked-by: Greg Kroah-Hartman Reviewed-by: Akash Asthana --- Changes in V2: - This patch fixes the UART flow control issue during suspend. Newly added in V2. Changes in V3: - As per Matthias's comment removed the extra parentheses. drivers/tty/serial/qcom_geni_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 07b7b6b..2aad9d7 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -242,7 +242,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, if (mctrl & TIOCM_LOOP) port->loopback = RX_TX_CTS_RTS_SORTED; - if (!(mctrl & TIOCM_RTS)) + if (!(mctrl & TIOCM_RTS) && !uport->suspended) uart_manual_rfr = UART_MANUAL_RFR_EN | UART_RFR_NOT_READY; writel(uart_manual_rfr, uport->membase + SE_UART_MANUAL_RFR); } -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation