Re: [PATCH] serial: core: Fix missing shutdown and startup for serial base port

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

 



Hi,

* Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> [240411 13:06]:
> On Thu, Apr 11, 2024 at 08:58:45AM +0300, Tony Lindgren wrote:
> > +out_base_port_startup:
> > +	uport = uart_port_check(state);
> > +	if (!uport)
> > +		return -EIO;
> > +
> > +	serial_base_port_startup(uport);
> 
> So, we call this even on uninitialised TTY. Is it okay?

To me it seems we should do it unconditionally unless there are
reasons to tie to the TTY init logic. This should be checked
though, maybe it needs to be tied to the TTY logic.

> >  	/* Flush any pending TX for the port */
> >  	uart_port_lock_irqsave(port, &flags);
> > +	if (!port_dev->tx_enabled)
> > +		goto unlock;
> 
> Can't this be integrated into...
> 
> >  	if (__serial_port_busy(port))
> 
> ...this call?

Yes so it seems thanks, it can be done to simplify the code.

Regards,

Tony





[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