Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1410880pxk; Thu, 10 Sep 2020 14:50:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6MEXo4ykQJju3QFjIOZajShw5Zwjo4uv/JC8H6ssXaPjIG8JNEp2ct43fdpvygsWi7kiF X-Received: by 2002:a50:9f6f:: with SMTP id b102mr11409209edf.272.1599774608490; Thu, 10 Sep 2020 14:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599774608; cv=none; d=google.com; s=arc-20160816; b=j2ZhO0f2tggH8WIrkoDyVqQuxS3wdkLdLbULBzrP/k5v4WN6Wk0SKCh74VqG0HUlnz Jsvmm7nyCH+R2HLsJ5kvd5Lqn4Imzz6amXFqbOLdIr0R/zEtrmUEXMns1c9vshJ/XOcJ VqsznZZV3BjKp628VM8jspU0hog+d5DXhhpP/jKYU2fvLgZVI9VZ8wr1mzcujlpR2w4p Oi9BpZt7tqdzphOpbWVDV33Rm5a83S1gKQMaOxV6xwoGWyX7J9d8n5z5Kj2Ef4gsVKgA QVVZzqpfeQSoSqXIgGsO5O8gjhQttVRUCFN1edJUUD1N2bn5NwAy2NI7/UouXBLb/ag+ /K8Q== 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=hWiCI4qn3Dp8O010lk092kO13sMvilCJd9nLALaV95E=; b=SvI7yq2WroicnoOZZZl9ahgqMG07txs55PZ8pvg8S1v3Uz9Gyyv4hmYhsuxii+hbZR JnnR7WFt7jK7+S9WM4hMeRlMg/qJwh1JBx8PlZvayLcvptl4HNX6UVU1/LE7Ktbgp1zy YBj+hAvh0PM3mCBq+aX8TjW1JuBgZ/P7oAQ68Rrr6fSb5xIaalrSnomFTj80WukA0M4N DByr+tqO0FmrZNCXMBCYSPGJ4juPJdM7OZI6zim6SsKIm28NhsuoIJWXXiDDV91pPjTG K3Mzkt6FWhVOeR+mpDpMiDYRs/SXTXqTdGzAeBCRHT4KL52nzwYBsXeh+vlc4Qmbe5av TPoA== 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 w15si4721235edf.56.2020.09.10.14.49.44; Thu, 10 Sep 2020 14:50:08 -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 S1728704AbgIJVnn (ORCPT + 99 others); Thu, 10 Sep 2020 17:43:43 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:32804 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730872AbgIJM40 (ORCPT ); Thu, 10 Sep 2020 08:56:26 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 10 Sep 2020 05:55:03 -0700 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 10 Sep 2020 05:55:01 -0700 Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg01-blr.qualcomm.com with ESMTP; 10 Sep 2020 18:24:31 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 8A6144409; Thu, 10 Sep 2020 18:24:30 +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, dianders@chromium.org, satya priya Subject: [PATCH V5 4/4] tty: serial: qcom_geni_serial: Fix the UART wakeup issue Date: Thu, 10 Sep 2020 18:23:58 +0530 Message-Id: <1599742438-16811-5-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599742438-16811-1-git-send-email-skakit@codeaurora.org> References: <1599742438-16811-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 0. 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. Changes in V4: - No change. Changes in V5: - As per Matthias comment, fixed nit-pick in commit text. 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 3aa29d2..bc63c54 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