[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DB9PR04MB8411BA914405C7EFA563A1CD92619@DB9PR04MB8411.eurprd04.prod.outlook.com>
Date: Wed, 24 Nov 2021 11:35:35 +0000
From: Sherry Sun <sherry.sun@....com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: "jirislaby@...nel.org" <jirislaby@...nel.org>,
"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2] tty: serial: imx: disable UCR4_OREN in .stop_rx()
instead of .shutdown()
Hi Greg,
> On Wed, Nov 24, 2021 at 10:56:43AM +0000, Sherry Sun wrote:
> > Hi Greg,
> >
> > > -----Original Message-----
> > > From: Greg KH <gregkh@...uxfoundation.org>
> > > Sent: 2021年11月24日 17:59
> > > To: Sherry Sun <sherry.sun@....com>
> > > Cc: jirislaby@...nel.org; u.kleine-koenig@...gutronix.de; linux-
> > > serial@...r.kernel.org; linux-kernel@...r.kernel.org; dl-linux-imx
> > > <linux- imx@....com>
> > > Subject: Re: [PATCH V2] tty: serial: imx: disable UCR4_OREN in
> > > .stop_rx() instead of .shutdown()
> > >
> > > On Tue, Nov 23, 2021 at 06:51:22PM +0800, Sherry Sun wrote:
> > > > From: Fugang Duan <fugang.duan@....com>
> > > >
> > > > Disable the UCR4_OREN bit in .stop_rx() before the uart receiver
> > > > is disabled maybe better than in the .shutdown() function.
> > >
> > > Why is it better? What does this "fix"?
> >
> > Since I am not clear about the history of this patch, so I haven't found any
> obvious issues without this patch so far.
>
> Then why submit it?
Because from the code logic, I think this patch is more reasonable.
>
> > But after discussing with the IP owner, it is still recommended to disable the
> receiver-related interrupts like OREN before disabling the receiver.
>
> recommended by what? The hardware designers?
Yes, the i.MX UART IP designer.
>
> > If not, when we have the overrun error during the receiver disable process,
> the overrun interrupt will keep trigging until we disable the OREN interrupt in
> the .shutdown(), because the ORE status can only be cleared when read the
> rx FIFO or reset the controller. Although the called time between the receiver
> disable and OREN disable in .shutdown() is very short, there is still the risk of
> endless interrupt during this short period of time. So had better to disable
> OREN before the receiver been disabled in .stop_rx().
>
> Please document this in the changelog, otherwise we have no idea why this is
> needed.
Sure, I will send V3 and add these info into the commit message. Thanks!
Best regards
Sherry
Powered by blists - more mailing lists