[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOCk7NpwTdj2qkeBYChhiq7YJ+Yz2g9-GMAx=zxgqeA=w6S9jw@mail.gmail.com>
Date: Mon, 4 Nov 2019 14:13:18 -0700
From: Jeffrey Hugo <jeffrey.l.hugo@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>, jslaby@...e.com,
MSM <linux-arm-msm@...r.kernel.org>,
linux-serial@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] tty: serial: msm_serial: Fix flow control
On Mon, Nov 4, 2019 at 9:41 AM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Sun, Nov 03, 2019 at 02:51:17PM -0700, Jeffrey Hugo wrote:
> > On Sat, Oct 26, 2019 at 11:55 PM Andy Gross <agross@...nel.org> wrote:
> > >
> > > 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@...il.com>
> > > > ---
> > >
> > > Reviewed-by: Andy Gross <agross@...nel.org>
> > >
> > > Greg, can you pick this one up?
> > >
> > > Thanks,
> > > Andy
> >
> > Greg, will this be queued for 5.5?
>
> Yes, catching up now...
Excellent, thank you very much.
Powered by blists - more mailing lists