RE: [PATCH V2] tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

> On Wed, Nov 24, 2021 at 10:56:43AM +0000, Sherry Sun wrote:
> > Hi Greg,
> >
> > > -----Original Message-----
> > > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> > > Sent: 2021年11月24日 17:59
> > > To: Sherry Sun <sherry.sun@xxxxxxx>
> > > Cc: jirislaby@xxxxxxxxxx; u.kleine-koenig@xxxxxxxxxxxxxx; linux-
> > > serial@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; dl-linux-imx
> > > <linux- imx@xxxxxxx>
> > > 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@xxxxxxx>
> > > >
> > > > 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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux