Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6299089imu; Mon, 21 Jan 2019 06:36:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN5nhLqiQvKrK8SAFu6iPDoQ36Q9CI5nQb0iq4gbfGzVEmagjZ52lSLyyRZIa1FTT49XO6Ow X-Received: by 2002:a63:6486:: with SMTP id y128mr28412678pgb.18.1548081416714; Mon, 21 Jan 2019 06:36:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548081416; cv=none; d=google.com; s=arc-20160816; b=bw9vR8pvgR15WVYP/5tD8+aWDN5/dMcWOYaoyz9hQskM3t1uFrsAI/dr4sUeMu6OE6 EvPeJlehixE6EvKvDv71FDQPrIForTTtoq3zJKrGdh+XyEXLdMc76Ht2kFq6U939cxTn vssdUcKEabs4I2XHKP4BSs7faPw8dsgemNEiuqezEcr4+uPfReb/ILM7kdl/aizu9VGp rwQZfhXFdN6yWJSQLgaP7eH6Ox5gGKYbkkV21NW/L1ZxXkfQFVPZlxOqA/iAuuSf2yqo Hy/GEBKsxUS4fdA4cAdredjS8xBDQRuitul78L2qJ8aUKhrCe2WOEsITvWj6v/qOYcqC iHiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=v1nMmXxMn6ktuzA6MjnPsur/fas8LC4yvpjMdeFjHx4=; b=duslu14duqasq3m9EKiktUbaSTMjcAFFWcLIYKU1TTqrK9ARqEW0E6RGXCEtJrT0jF h7MbUWbj/RccEwOiwXV3Ut5MbOJRt0pa3Lva5w9JlymSKJ+DRt2P9BsD/O8yh2/Mr3g1 USHs4xrVRJTDuhDGtGslNYYOb4UaD92BHSCoPMEseNlUwXjHBxVYuG4FGASQbtyWBqsz Du6GBWwmS1tRs/iSr6XAIWb+dE2+KurI5Pw7XmywGC/y7JcBztR6bB+FUhkcALDAs43r pRzf31gr8QK6lq5SgPrgbBxa/JhYCnkYqIGCp/k8aWXfJSG2LJmK50suALZe8jGjsplZ A+6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kh2p3bsT; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kh2p3bsT; 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 n7si12530745plp.147.2019.01.21.06.36.40; Mon, 21 Jan 2019 06:36:56 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kh2p3bsT; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kh2p3bsT; 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 S1729308AbfAUOfN (ORCPT + 99 others); Mon, 21 Jan 2019 09:35:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:57484 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729140AbfAUOfM (ORCPT ); Mon, 21 Jan 2019 09:35:12 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C35AF6083E; Mon, 21 Jan 2019 14:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548081311; bh=FOiN1HkEmm2lqQPcXiD2FfTbXUvTeNZCLs23EHUCGQs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Kh2p3bsT2z29cIBRdguFqFPYdZB/QQv8nZtXFj5SLTWC9j8fsCTGFoeF/r3q8B2li 6W/s+Cj0SHPRHtgVeGYf6aAHz00wc+rKJagpXUQnkDRR7kf9NJK0JmJR0pRJllBQcg UahwOI2Cs2QYdSe3xYNsPCMXnAxvmFyK2g/X0wzE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 084396079C; Mon, 21 Jan 2019 14:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548081311; bh=FOiN1HkEmm2lqQPcXiD2FfTbXUvTeNZCLs23EHUCGQs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Kh2p3bsT2z29cIBRdguFqFPYdZB/QQv8nZtXFj5SLTWC9j8fsCTGFoeF/r3q8B2li 6W/s+Cj0SHPRHtgVeGYf6aAHz00wc+rKJagpXUQnkDRR7kf9NJK0JmJR0pRJllBQcg UahwOI2Cs2QYdSe3xYNsPCMXnAxvmFyK2g/X0wzE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 21 Jan 2019 20:05:10 +0530 From: msavaliy@codeaurora.org To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Balakrishna Godavarthi , linux-kernel-owner@vger.kernel.org Subject: Re: [PATCH] tty: serial: qcom_geni_serial: Allow mctrl when flow control is disabled In-Reply-To: <20190119002305.16639-1-mka@chromium.org> References: <20190119002305.16639-1-mka@chromium.org> Message-ID: <3d739661db11d669cf8a9cba3f0853fa@codeaurora.org> X-Sender: msavaliy@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-01-19 05:53, Matthias Kaehlcke wrote: > The geni set/get_mctrl() functions currently do nothing unless > hardware flow control is enabled. Remove this arbitrary limitation. > > Suggested-by: Johan Hovold > Fixes: 8a8a66a1a18a ("tty: serial: qcom_geni_serial: Add support for > flow control") > Signed-off-by: Matthias Kaehlcke > --- > drivers/tty/serial/qcom_geni_serial.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/qcom_geni_serial.c > b/drivers/tty/serial/qcom_geni_serial.c > index a72d6d9fb9834..38016609c7fa9 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -225,7 +225,7 @@ static unsigned int > qcom_geni_serial_get_mctrl(struct uart_port *uport) > unsigned int mctrl = TIOCM_DSR | TIOCM_CAR; > u32 geni_ios; > > - if (uart_console(uport) || !uart_cts_enabled(uport)) { > + if (uart_console(uport)) { > mctrl |= TIOCM_CTS; > } else { > geni_ios = readl_relaxed(uport->membase + SE_GENI_IOS); > @@ -241,7 +241,7 @@ static void qcom_geni_serial_set_mctrl(struct > uart_port *uport, > { > u32 uart_manual_rfr = 0; > > - if (uart_console(uport) || !uart_cts_enabled(uport)) > + if (uart_console(uport)) > return; > > if (!(mctrl & TIOCM_RTS)) Though late but wanted to check on why flow control is disabled in a BT case ? If i understand, CRTSCTS at serial core is what makes flow as enabled with UPSTAT_CTS_ENABLE set and that in turn returned by uart_cts_enabled(uport). So is there any settings or configuration missing to enable flow control ? There could be a case to have 2 wire UART without flow control enablement, In that case we may need check for uart_cts_enabled() right ? Please add/correct if i missed something.