From: Andy Gross <agross@kernel.org>
To: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Cc: bjorn.andersson@linaro.org, gregkh@linuxfoundation.org,
jslaby@suse.com, linux-arm-msm@vger.kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tty: serial: msm_serial: Fix flow control
Date: Sun, 27 Oct 2019 00:55:28 -0500 [thread overview]
Message-ID: <20191027055528.GJ5514@hector.lan> (raw)
In-Reply-To: <20191021154616.25457-1-jeffrey.l.hugo@gmail.com>
On Mon, Oct 21, 2019 at 08:46:16AM -0700, Jeffrey Hugo wrote:
> hci_qca interfaces to the wcn3990 via a uart_dm on the msm8998 mtp and
> Lenovo Miix 630 laptop. As part of initializing the wcn3990, hci_qca
> disables flow, configures the uart baudrate, and then reenables flow - at
> which point an event is expected to be received over the uart from the
> wcn3990. It is observed that this event comes after the baudrate change
> but before hci_qca re-enables flow. This is unexpected, and is a result of
> msm_reset() being broken.
>
> According to the uart_dm hardware documentation, it is recommended that
> automatic hardware flow control be enabled by setting RX_RDY_CTL. Auto
> hw flow control will manage RFR based on the configured watermark. When
> there is space to receive data, the hw will assert RFR. When the watermark
> is hit, the hw will de-assert RFR.
>
> The hardware documentation indicates that RFR can me manually managed via
> CR when RX_RDY_CTL is not set. SET_RFR asserts RFR, and RESET_RFR
> de-asserts RFR.
>
> msm_reset() is broken because after resetting the hardware, it
> unconditionally asserts RFR via SET_RFR. This enables flow regardless of
> the current configuration, and would undo a previous flow disable
> operation. It should instead de-assert RFR via RESET_RFR to block flow
> until the hardware is reconfigured. msm_serial should rely on the client
> to specify that flow should be enabled, either via mctrl() or the termios
> structure, and only assert RFR in response to those triggers.
>
> Fixes: 04896a77a97b ("msm_serial: serial driver for MSM7K onboard serial peripheral.")
> Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
> ---
Reviewed-by: Andy Gross <agross@kernel.org>
Greg, can you pick this one up?
Thanks,
Andy
next prev parent reply other threads:[~2019-10-27 5:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 15:46 [PATCH v2] tty: serial: msm_serial: Fix flow control Jeffrey Hugo
2019-10-21 16:26 ` Bjorn Andersson
2019-10-27 5:55 ` Andy Gross [this message]
2019-11-03 21:51 ` Jeffrey Hugo
2019-11-04 16:41 ` Greg Kroah-Hartman
2019-11-04 21:13 ` Jeffrey Hugo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191027055528.GJ5514@hector.lan \
--to=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=jslaby@suse.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox