lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2] tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown()
Date
Hi Greg,

> On Wed, Nov 24, 2021 at 10:56:43AM +0000, Sherry Sun wrote:
> > Hi Greg,
> >
> > > -----Original Message-----
> > > From: Greg KH <gregkh@linuxfoundation.org>
> > > Sent: 2021年11月24日 17:59
> > > To: Sherry Sun <sherry.sun@nxp.com>
> > > Cc: jirislaby@kernel.org; u.kleine-koenig@pengutronix.de; linux-
> > > serial@vger.kernel.org; linux-kernel@vger.kernel.org; dl-linux-imx
> > > <linux- imx@nxp.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@nxp.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
\
 
 \ /
  Last update: 2021-11-24 12:36    [W:0.061 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site