Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp609386pxk; Thu, 3 Sep 2020 08:10:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxCLZ/br18pH8U0fWwBKDfce74G6QIMrPDqdTnbHrYGjq7IqhFr7GhCQW89iyuQB14m2gO X-Received: by 2002:a05:6402:110e:: with SMTP id u14mr3597982edv.297.1599145827153; Thu, 03 Sep 2020 08:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599145827; cv=none; d=google.com; s=arc-20160816; b=ZZMGlVDJ/OXANK16/N216ZZKWLbszXPEjev8xLOVV6QasKhRK/97pMuJOYx27cFCYK 0L5rLW8MMTxb4Sb1yMB6+De83iZl7oA0H3bicazCvGjfFGcJFoYZpYqujeneRkKn7lgv gX88hMdZTdy8zLHkl5udSEEqckhZHojxXvagmjqPsvRaxlp7PE/LlS15DlprdGweVhN9 zClwy4KR+6s/Vg+hnx78aVCkzWUbP/kQVNgWy+FFB2N5dVVWRH3RL4caVGm0R7Vav1s2 sL8HLR42KVE7TgQiYZ+ZMtPTAeeCFG2kg1L+vrLwHwlo13RTSO9CK2j9tQvnOIaUuTk4 F2ig== 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=+5pi8vkEgtnRaIGg65/WUYLPpc7SZ6wwhbWswjaS2H4=; b=Qn0M4hMF3/iKnGG8aLy+lrPCSkjoLEeMJVEgWfjiE/gH5c6Iz9SiZ+RUJcdDpudXA7 nXnzPUWJm7i2ZiYpRCQEgBL79FLtNw8uctUOdXMCIzcpNbNTB6iwGmUG2ylLEdxPAZky SB6xVYw/5x+RmTC1m00nDj1JXCBgpyzEgYh2+PWTm0S9PJ1vcf9JR7VQO1yUfgoR7CRj W+F6QhX+8CD5awSVLzm1twjIi/s8hGpV4fTkZsZPFFhfC3nsLXr2MfeYovykzDgEC/pt LH6CDEdaGww9S8zv6R4ig7ygtwGTW9YsvryO+EDZPxZ/scDkaKK2OaCruuI41/93ulnI c7eQ== 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 bn6si2085283ejb.74.2020.09.03.08.10.03; Thu, 03 Sep 2020 08:10:27 -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 S1729179AbgICPGm (ORCPT + 99 others); Thu, 3 Sep 2020 11:06:42 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:45300 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729357AbgICPFt (ORCPT ); Thu, 3 Sep 2020 11:05:49 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 03 Sep 2020 08:05:36 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 03 Sep 2020 08:05:34 -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; 03 Sep 2020 20:35:05 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id E50A244AB; Thu, 3 Sep 2020 20:35:04 +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 V4 4/4] tty: serial: qcom_geni_serial: Fix the UART wakeup issue Date: Thu, 3 Sep 2020 20:34:58 +0530 Message-Id: <1599145498-20707-5-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599145498-20707-1-git-send-email-skakit@codeaurora.org> References: <1599145498-20707-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. Changes in V4: - 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 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