Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2190068pxk; Mon, 14 Sep 2020 07:05:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8sEZfQIamixGBX1OKC25R0h5xlNuiIkv9RxabHYyt60pASFc2jmeRY5IulcbzoPIPRomC X-Received: by 2002:aa7:ce19:: with SMTP id d25mr17475498edv.189.1600092330536; Mon, 14 Sep 2020 07:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600092330; cv=none; d=google.com; s=arc-20160816; b=dHSOh0sovt4Nxsn4wD5tGUX8KsfFURin8sVynFleNAfw6fsrdQfpsjR8Vt/A69CaN0 ahu69I4rVah7jtbTfMN44zfLsP6Zpz+MKkgStPkYzqQ3JoEDKwfEknwCe8HDSyQ0UgVt B9jNnDaPZUCaEutARRct7s/NQaUFyEEtMRb+rJbMtmcm3NciNwftCZUmrgl7jKkNe1dz sP/8MbMvemT9EQAeXlQDbc90B22PMgklBqJAhoEiLvUa6VLC7dCoPAjh+RaVRwNnLor7 q5Rtm2t4QYY/xoZf8In2m2156S16obZVf8qJH6v2y45yFueQAdyNI9CeS0QWCNM6f7Se zkpA== 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=V1IkgFNo6wNpzwcQ+U5dlIN0JR3KKxKieJzL7JvT/nU=; b=WEYebkUFS1js/HQS33pPcwoh1y36Kn7oRd+D+qW5vhh8jCEG5sO6HY9Jexcdscc9Dm 4JNHqDLtv85qP7ocRCl8KX2rvze4jiFLN9kV8AOuEYn+JJfRcr5ktjq/41JvwGF0/uRO h2Id9E2GRosQhLZqv8dLzwAPhZ91/cW0eBWRJ48dG3Kf3h9WZQqIAiAYqlEN02soalKF It6G4J8v14AYmKH2cGYTvh+lcXs9nLEyL4H4h7RWm4BaFHGXOVTLHLmY0MGB+XUvra4H q9SCDpR0J8bo6wVIKe7gRV7hXpcmLkp9y0nVhiQHqobtITJHtPcjXVwIceF0UzyAo8ab S/sQ== 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 z9si7576981edp.477.2020.09.14.07.05.08; Mon, 14 Sep 2020 07:05:30 -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 S1726414AbgINOCZ (ORCPT + 99 others); Mon, 14 Sep 2020 10:02:25 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:36375 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgINN7X (ORCPT ); Mon, 14 Sep 2020 09:59:23 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 14 Sep 2020 06:59:22 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 14 Sep 2020 06:59:20 -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; 14 Sep 2020 19:28:55 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 5FA8544E3; Mon, 14 Sep 2020 19:28:54 +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 V6 4/4] tty: serial: qcom_geni_serial: Fix the UART wakeup issue Date: Mon, 14 Sep 2020 19:28:37 +0530 Message-Id: <1600091917-7464-5-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600091917-7464-1-git-send-email-skakit@codeaurora.org> References: <1600091917-7464-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: Bjorn Andersson --- 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. Changes in V6: - No change. 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